diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-04-24 18:12:11 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-04-24 18:12:11 +0200 |
commit | 0b8eb5396bd3ee2c45a2567fe59a81ed35ebedc0 (patch) | |
tree | ba0fbc9ca84446dd455a26fbbf89e8b46d0030a7 /src | |
parent | d6e4b2cc87b6c38bd79f3c1b7350717ded8f4b7b (diff) | |
download | weechat-0b8eb5396bd3ee2c45a2567fe59a81ed35ebedc0.zip |
core: fix scroll in windows with /window scroll (skip lines "Day changed to")
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui-window.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 7e9505e68..55d667997 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -798,7 +798,9 @@ gui_window_scroll (struct t_gui_window *window, char *scroll) { ptr_line = (window->scroll->start_line) ? window->scroll->start_line : window->buffer->lines->last_line; - while (ptr_line && !gui_line_is_displayed (ptr_line)) + while (ptr_line + && (!gui_line_is_displayed (ptr_line) + || (ptr_line->data->date == 0))) { ptr_line = ptr_line->prev_line; } @@ -807,7 +809,9 @@ gui_window_scroll (struct t_gui_window *window, char *scroll) { ptr_line = (window->scroll->start_line) ? window->scroll->start_line : window->buffer->lines->first_line; - while (ptr_line && !gui_line_is_displayed (ptr_line)) + while (ptr_line + && (!gui_line_is_displayed (ptr_line) + || (ptr_line->data->date == 0))) { ptr_line = ptr_line->next_line; } @@ -825,7 +829,7 @@ gui_window_scroll (struct t_gui_window *window, char *scroll) ptr_line = (direction < 0) ? gui_line_get_prev_displayed (ptr_line) : gui_line_get_next_displayed (ptr_line); - if (ptr_line) + if (ptr_line && (ptr_line->data->date != 0)) { if (time_letter == ' ') { |