From 5106c065527fd6a91d3f0e8e31d452287a209f9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Wed, 28 Dec 2011 23:14:27 +0100 Subject: [PATCH] screen_keydef: save lw->start when switching view modes --- src/screen_keydef.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 0836964..f31e6c5 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -159,11 +159,16 @@ keydef_repaint(void) wrefresh(lw->w); } +/** lw->start the last time switch_to_subcmd_mode() was called */ +static unsigned saved_start = 0; + static void switch_to_subcmd_mode(int cmd) { assert(subcmd == -1); + saved_start = lw->start; + subcmd = cmd; list_window_reset(lw); check_subcmd_length(); @@ -180,6 +185,8 @@ switch_to_command_mode(void) list_window_set_cursor(lw, subcmd); subcmd = -1; + lw->start = saved_start; + keydef_repaint(); } -- 2.30.2