From 12cf1c99801eb382b4a2274059ebf2de22975a07 Mon Sep 17 00:00:00 2001 From: Brand Huntsman Date: Fri, 17 Jan 2020 16:37:19 -0700 Subject: [PATCH] input: beep when invalid key is pressed at yesno prompt or in linter menu Just like nano beeps when an unbound key is pressed at other prompts, or in the help viewer, or in the file browser. Signed-off-by: Brand Huntsman --- src/prompt.c | 2 ++ src/text.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/prompt.c b/src/prompt.c index 80946063..a73c4bd4 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -763,6 +763,8 @@ int do_yesno_prompt(bool all, const char *msg) } } #endif /* ENABLE_MOUSE */ + else + beep(); } return choice; diff --git a/src/text.c b/src/text.c index 99d7d4c5..a15de98b 100644 --- a/src/text.c +++ b/src/text.c @@ -3008,7 +3008,8 @@ void do_linter(void) last_wait = time(NULL); statusline(NOTICE, curlint->msg); } - } + } else + beep(); } for (curlint = lints; curlint != NULL;) {