From 91b7aec8556798e672dbbf6a4301a20d66e8b43f Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 31 Jul 2013 14:41:27 +0200 Subject: [PATCH] core: reset scroll after /window {page_down|scroll_down} if last line of buffer is displayed at bottom A regression was introduced by commit bee56c3b7fa6ef0ce820a8f0a7e5e51b95aa3fab (/window scroll_beyond_end). Scenario to reproduce the problem, for example on an IRC channel with a long history (more than two pages): /window page_up /window page_down It will display -MORE(1)- instead of automatically scrolling to bottom of buffer. --- src/gui/curses/gui-curses-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 920e18324..156dd033d 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1303,7 +1303,7 @@ gui_window_page_down (struct t_gui_window *window) ptr_line = window->scroll->start_line; line_pos = window->scroll->start_line_pos; gui_chat_calculate_line_diff (window, &ptr_line, &line_pos, - window->win_chat_height - 1); + window->win_chat_height); if (!ptr_line) { window->scroll->start_line = NULL; @@ -1392,7 +1392,7 @@ gui_window_scroll_down (struct t_gui_window *window) ptr_line = window->scroll->start_line; line_pos = window->scroll->start_line_pos; gui_chat_calculate_line_diff (window, &ptr_line, &line_pos, - window->win_chat_height - 1); + window->win_chat_height); if (!ptr_line) {