From 4d9c27ee3988612a460c8e23b389906a5f6d7e20 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Oct 2009 18:20:42 +0200 Subject: [PATCH] screen_browser: select next item after select/add Commit d08e14fa broke this: previously, the assignment "cmd=CMD_LIST_NEXT" was passed to list_window_cmd(). With this patch, list_window_cmd() was called before. Thanks to Thomas Jansen for finding this one. --- src/screen_browser.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/screen_browser.c b/src/screen_browser.c index 851f18c..604d424 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -465,19 +465,17 @@ browser_cmd(struct screen_browser *browser, case CMD_SELECT: if (browser_handle_select(browser, c)) - /* continue and select next item... */ - cmd = CMD_LIST_NEXT; - - /* call list_window_cmd to go to the next item */ - break; + list_window_cmd(browser->lw, + filelist_length(browser->filelist), + CMD_LIST_NEXT); + return true; case CMD_ADD: if (browser_handle_add(browser, c)) - /* continue and select next item... */ - cmd = CMD_LIST_NEXT; - - /* call list_window_cmd to go to the next item */ - break; + list_window_cmd(browser->lw, + filelist_length(browser->filelist), + CMD_LIST_NEXT); + return true; case CMD_SELECT_ALL: browser_handle_select_all(browser, c); -- 2.30.2