nano

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

commit 5f6f8a80831922ebfc46cd4af277772e3a4fe886
parent e938c24d04fe17b09c20b22041fd636c5157bd34
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed,  7 Nov 2018 16:38:07 +0100

bindings: stop binding <Bsp> to do_backspace() in the browser menu

Further down, the <Backspace> key is bound to do_page_up() for MHELP
and MBROWSER, so this earlier binding should exclude MBROWSER.

This partially fixes https://savannah.gnu.org/bugs/?54978.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>

Bug existed since version 2.9.2, commit 8581e702.

Diffstat:
Msrc/global.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -1091,16 +1091,16 @@ void shortcut_init(void) /* Link key combos to functions in certain menus. */ add_to_sclist(MMOST, "^M", 0, do_enter, 0); add_to_sclist(MMOST, "Enter", KEY_ENTER, do_enter, 0); - add_to_sclist(MMOST, "^H", 0, do_backspace, 0); - add_to_sclist(MMOST, "Bsp", KEY_BACKSPACE, do_backspace, 0); - add_to_sclist(MMOST, "Sh-Del", SHIFT_DELETE, do_backspace, 0); + add_to_sclist(MMOST & ~MBROWSER, "^H", 0, do_backspace, 0); + add_to_sclist(MMOST & ~MBROWSER, "Bsp", KEY_BACKSPACE, do_backspace, 0); + add_to_sclist(MMOST & ~MBROWSER, "Sh-Del", SHIFT_DELETE, do_backspace, 0); add_to_sclist(MMOST, "^D", 0, do_delete, 0); add_to_sclist(MMOST, "Del", 0, do_delete, 0); /* Make ASCII DEL do a delete when requested, otherwise a backspace. */ if (ISSET(REBIND_DELETE)) add_to_sclist(MMOST, "Del", DEL_CODE, do_delete, 0); else - add_to_sclist(MMOST, "Bsp", DEL_CODE, do_backspace, 0); + add_to_sclist(MMOST & ~MBROWSER, "Bsp", DEL_CODE, do_backspace, 0); add_to_sclist(MMOST, "^I", 0, do_tab, 0); add_to_sclist(MMOST, "Tab", TAB_CODE, do_tab, 0); add_to_sclist(MMOST & ~MFINDINHELP, "^G", 0, do_help_void, 0);