nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit a78da18aa48a131d9251de124c40adb9d8c132a1
parent d764d7094f7bf78b9ca8c6d7eadd535e635beb43
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 24 Jan 2020 19:20:21 +0100

input: ignore bracketed pastes in help viewer and file browser

This partially fixes https://savannah.gnu.org/bugs/?57623.
Reported-by: Brand Huntsman <alpha@qzx.com>

Diffstat:
Msrc/browser.c | 7++++++-
Msrc/help.c | 6++++++
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/browser.c b/src/browser.c @@ -145,7 +145,12 @@ char *do_browser(char *path) continue; } #endif /* ENABLE_MOUSE */ - +#ifndef NANO_TINY + if (bracketed_paste || kbinput == BRACKETED_PASTE_MARKER) { + beep(); + continue; + } +#endif func = parse_browser_input(&kbinput); if (func == total_refresh) { diff --git a/src/help.c b/src/help.c @@ -187,6 +187,12 @@ void show_help(void) kbinput = get_kbinput(edit, didfind == 1 || ISSET(SHOW_CURSOR)); didfind = 0; +#ifndef NANO_TINY + if (bracketed_paste || kbinput == BRACKETED_PASTE_MARKER) { + beep(); + continue; + } +#endif func = parse_help_input(&kbinput); if (func == total_refresh) {