aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-08-24 09:05:28 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-08-24 09:05:28 +0200
commitda14bdbd394f00277cbc48433374386ae5ecfc29 (patch)
tree6ce79fa590706f8ca5da41f97b66b9ff0fab740a
parent24e57872d88793ab0da07b5fe0585dae6d69b94f (diff)
downloadnncmpp-da14bdbd394f00277cbc48433374386ae5ecfc29.tar.gz
nncmpp-da14bdbd394f00277cbc48433374386ae5ecfc29.tar.xz
nncmpp-da14bdbd394f00277cbc48433374386ae5ecfc29.zip
Improve help tab item choice error messages
-rw-r--r--nncmpp.c9
1 files 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