From da14bdbd394f00277cbc48433374386ae5ecfc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 24 Aug 2022 09:05:28 +0200 Subject: Improve help tab item choice error messages --- nncmpp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nncmpp.c b/nncmpp.c index 0406cfb..4db9cbf 100644 --- a/nncmpp.c +++ b/nncmpp.c @@ -4048,9 +4048,12 @@ help_tab_on_action (enum action action) return false; action = g_help_tab.actions[tab->item_selected]; - return action != ACTION_NONE - && action != ACTION_CHOOSE // avoid recursion - && app_process_action (action); + if (action == ACTION_NONE || action == ACTION_CHOOSE /* avoid recursion */) + return false; + + // XXX: We can't propagate failure, which produces beeps in the TUI, but we + // don't want to let our caller show a bad "can't do that" message either. + return app_process_action (action), true; } static void -- cgit v1.2.3