summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-12-07 13:45:41 +0100
committerSebastien Helleu <flashcode@flashtux.org>2012-12-07 13:45:41 +0100
commitf7c47a8644e7a57ffe3d2be92f167cab6d6edbda (patch)
tree21a025b68ed728f07053e642c31a55a3f4d04d13
parenteabf103e71b64a7abc3dc8c6ec35bab2b1a7650c (diff)
downloadweechat-f7c47a8644e7a57ffe3d2be92f167cab6d6edbda.zip
core: fix scroll of one page down when weechat.look.scroll_page_percent is less than 100 (bug #37875)
-rw-r--r--ChangeLog4
-rw-r--r--src/gui/curses/gui-curses-window.c12
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 <flashcode@flashtux.org>
-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)