summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-07-31 14:41:27 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-07-31 14:41:27 +0200
commit91b7aec8556798e672dbbf6a4301a20d66e8b43f (patch)
tree2c1f4b4fa2d2b3fe17b861e2af7074c6bef0ff5e
parent261efe6299710424812faadf03905198763e3014 (diff)
downloadweechat-91b7aec8556798e672dbbf6a4301a20d66e8b43f.zip
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 <type some text and send to channel> It will display -MORE(1)- instead of automatically scrolling to bottom of buffer.
-rw-r--r--src/gui/curses/gui-curses-window.c4
1 files 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)
{