diff options
-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 55d667997..f8deb1af6 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -800,7 +800,8 @@ gui_window_scroll (struct t_gui_window *window, char *scroll) window->scroll->start_line : window->buffer->lines->last_line; while (ptr_line && (!gui_line_is_displayed (ptr_line) - || (ptr_line->data->date == 0))) + || ((window->buffer->type == GUI_BUFFER_TYPE_FORMATTED) + && (ptr_line->data->date == 0)))) { ptr_line = ptr_line->prev_line; } @@ -811,7 +812,8 @@ gui_window_scroll (struct t_gui_window *window, char *scroll) window->scroll->start_line : window->buffer->lines->first_line; while (ptr_line && (!gui_line_is_displayed (ptr_line) - || (ptr_line->data->date == 0))) + || ((window->buffer->type == GUI_BUFFER_TYPE_FORMATTED) + && (ptr_line->data->date == 0)))) { ptr_line = ptr_line->next_line; } @@ -829,7 +831,9 @@ 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 && (ptr_line->data->date != 0)) + if (ptr_line + && ((window->buffer->type != GUI_BUFFER_TYPE_FORMATTED) + || (ptr_line->data->date != 0))) { if (time_letter == ' ') { |