From 0b8eb5396bd3ee2c45a2567fe59a81ed35ebedc0 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 24 Apr 2011 18:12:11 +0200 Subject: core: fix scroll in windows with /window scroll (skip lines "Day changed to") --- src/gui/gui-window.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/gui/gui-window.c') 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 == ' ') { -- cgit v1.2.3