summaryrefslogtreecommitdiff
path: root/src/gui/curses
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-07-31 19:09:31 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-07-31 19:09:31 +0200
commitc0c76ad9957396f647a9362d5f8b0db0489aa0f2 (patch)
treee61eb5e8c6e50e0fa2b41d471f4c870e5fcaf02b /src/gui/curses
parent35c3dbad6372a121f6dd68bffae59a2e372e2e88 (diff)
downloadweechat-c0c76ad9957396f647a9362d5f8b0db0489aa0f2.zip
core: do not scroll when using /window {page_down|scroll_down} after /window scroll_beyond_end
Diffstat (limited to 'src/gui/curses')
-rw-r--r--src/gui/curses/gui-curses-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 156dd033d..6c92d34a7 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -1293,7 +1293,8 @@ gui_window_page_down (struct t_gui_window *window)
switch (window->buffer->type)
{
case GUI_BUFFER_TYPE_FORMATTED:
- if (window->scroll->start_line)
+ if (window->scroll->start_line
+ && (window->scroll->start_line_pos >= 0))
{
gui_chat_calculate_line_diff (window, &window->scroll->start_line,
&window->scroll->start_line_pos,
@@ -1382,7 +1383,8 @@ gui_window_scroll_down (struct t_gui_window *window)
switch (window->buffer->type)
{
case GUI_BUFFER_TYPE_FORMATTED:
- if (window->scroll->start_line)
+ if (window->scroll->start_line
+ && (window->scroll->start_line_pos >= 0))
{
gui_chat_calculate_line_diff (window, &window->scroll->start_line,
&window->scroll->start_line_pos,