From: Jonathan Neuschäfer Date: Wed, 28 Dec 2011 22:14:27 +0000 (+0100) Subject: screen_keydef: save lw->start when switching view modes X-Git-Tag: release-0.20~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5106c065527fd6a91d3f0e8e31d452287a209f9a;p=ncmpc.git screen_keydef: save lw->start when switching view modes --- 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(); }