From 6c17328bdf07a31f53f0cd3df84e0dba6ec7983d Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 4 Jun 2010 13:46:33 +0200 Subject: [PATCH] Fix bug with scroll_unread: do not scroll to a filtered line (bug #29991) --- ChangeLog | 2 ++ src/gui/gui-input.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index f41707bb0..a63a83a63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ Version 0.3.3 (under dev!) * core: add keys for undo/redo changes on command line (default: ctrl/alt + underscore) (task #9483) * core: add new option weechat.look.confirm_quit +* core: fix bug with scroll_unread: do not scroll to a filtered line + (bug #29991) * core: fix crash with hook_process (when timer is called on a deleted hook process) * api: add function "string_expand_home", fix bug with replacement of home in diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 2977bbef6..bbe2b3dda 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -1260,6 +1260,11 @@ gui_input_scroll_unread (struct t_gui_window *window) window->start_line = window->buffer->lines->first_line; else window->start_line = window->buffer->lines->last_read_line->next_line; + if (window->start_line) + { + if (!gui_line_is_displayed (window->start_line)) + window->start_line = gui_line_get_next_displayed (window->start_line); + } window->start_line_pos = 0; window->first_line_displayed = (window->start_line == gui_line_get_first_displayed (window->buffer));