From f7c47a8644e7a57ffe3d2be92f167cab6d6edbda Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 7 Dec 2012 13:45:41 +0100 Subject: [PATCH] core: fix scroll of one page down when weechat.look.scroll_page_percent is less than 100 (bug #37875) --- ChangeLog | 4 +++- src/gui/curses/gui-curses-window.c | 12 +++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 760b6c49a..7369d139b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.0-dev, 2012-12-05 +v0.4.0-dev, 2012-12-07 Version 0.4.0 (under dev!) -------------------------- +* core: fix scroll of one page down when weechat.look.scroll_page_percent is + less than 100 (bug #37875) * core: disable paste detection and confirmation if bar item "input_paste" is not used in a visible bar (task #12327) * core: use high priority (50000) for commands /command and /input so that an diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 0731c55b4..789baf912 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1307,12 +1307,11 @@ gui_window_page_down (struct t_gui_window *window) &window->scroll->start_line_pos, num_lines); - /* check if we can display all */ + /* check if we can display all lines in chat area */ ptr_line = window->scroll->start_line; line_pos = window->scroll->start_line_pos; - gui_chat_calculate_line_diff (window, &ptr_line, - &line_pos, - num_lines); + gui_chat_calculate_line_diff (window, &ptr_line, &line_pos, + window->win_chat_height - 1); if (!ptr_line) { window->scroll->start_line = NULL; @@ -1399,11 +1398,10 @@ gui_window_scroll_down (struct t_gui_window *window) &window->scroll->start_line_pos, CONFIG_INTEGER(config_look_scroll_amount)); - /* check if we can display all */ + /* check if we can display all lines in chat area */ ptr_line = window->scroll->start_line; line_pos = window->scroll->start_line_pos; - gui_chat_calculate_line_diff (window, &ptr_line, - &line_pos, + gui_chat_calculate_line_diff (window, &ptr_line, &line_pos, window->win_chat_height - 1); if (!ptr_line)