From 19d03e691b58bcffe1358580e7ab88bcc573ec80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Sat, 21 Jul 2012 10:04:34 +0200 Subject: [PATCH] core: scroll to bottom of window after reaching first or last highlight with keys alt+"p" / alt+"n" --- ChangeLog | 4 +++- src/gui/gui-window.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 791b34009..7f870dd9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.9-dev, 2012-07-20 +v0.3.9-dev, 2012-07-21 Version 0.3.9 (under dev!) -------------------------- +* core: scroll to bottom of window after reaching first or last highlight with + keys alt+"p" / alt+"n" * core: add support of arrays in hdata variables * core: add command line option "-r" (or "--run-command") to run command(s) after startup of WeeChat diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 8f8f51021..a1cb23c3d 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -1354,6 +1354,8 @@ gui_window_scroll_previous_highlight (struct t_gui_window *window) } ptr_line = ptr_line->prev_line; } + /* no previous highlight, scroll to bottom */ + gui_window_scroll_bottom (window); } } } @@ -1387,6 +1389,8 @@ gui_window_scroll_next_highlight (struct t_gui_window *window) } ptr_line = ptr_line->next_line; } + /* no next highlight, scroll to bottom */ + gui_window_scroll_bottom (window); } } }