commit f2c30aa4374c04f6c3c58b56c31224162da1c5c2
parent bf12c90b076a424d2a399c543de24dac906f0a21
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 11 Mar 2025 15:34:03 +0100
prompt: beep when an external paste contains a command code
Until the previous commit, nano used to beep for any command code
in an external paste. It's better to continue doing that.
(When pasting multiple lines, it's debatable whether nano should
beep for each discarded CR. But for any other command code, it
definitely should beep. Maybe it should even show a message.)
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/prompt.c b/src/prompt.c
@@ -473,8 +473,11 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
#ifndef NANO_TINY
/* Ignore any commands inside an external paste. */
- if (bracketed_paste)
+ if (bracketed_paste) {
+ if (function && function != do_nothing)
+ beep();
continue;
+ }
#endif
if (function == do_cancel || function == do_enter)