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.
This commit is contained in:
Sebastien Helleu 2013-07-31 14:41:27 +02:00
parent 261efe6299
commit 91b7aec855

View File

@ -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)
{