diff --git a/apps/menu.c b/apps/menu.c index c86ada1986..d8d1b6b081 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -458,9 +458,16 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, if (global_settings.shortcuts_replaces_qs || quick_screen_quick(action) == QUICKSCREEN_GOTO_SHORTCUTS_MENU) { + int last_screen = global_status.last_screen; global_status.last_screen = GO_TO_SHORTCUTMENU; - ret = do_shortcut_menu(NULL); - done = true; + int shortcut_ret = do_shortcut_menu(NULL); + if (shortcut_ret == GO_TO_PREVIOUS) + global_status.last_screen = last_screen; + else + { + ret = shortcut_ret; + done = true; + } } redraw_lists = true; } diff --git a/apps/tree.c b/apps/tree.c index cb7c033b6f..70f2704fae 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -766,8 +766,13 @@ static int dirbrowse(void) if (enter_shortcuts_menu && *tc.dirfilter < NUM_FILTER_MODES) { + int last_screen = global_status.last_screen; global_status.last_screen = GO_TO_SHORTCUTMENU; - return do_shortcut_menu(NULL); + int shortcut_ret = do_shortcut_menu(NULL); + if (shortcut_ret == GO_TO_PREVIOUS) + global_status.last_screen = last_screen; + else + return shortcut_ret; } restore = true;