nano

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

commit 55c52c50d0ea32ee203f674bfb0a7eab6d278e0c
parent 77bd8c2630bcf500529492fa2d9e8ae52d112647
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 23 Dec 2018 18:04:02 +0100

bindings: hard-bind ASCII code 0x08 (BS) to the backspace function

ASCII code BS should always do a backspace, also on systems where the
"^H" string gets redirected (for rebinding purposes) to KEY_BACKSPACE.

This fixes https://savannah.gnu.org/bugs/?55247.
Reported-by: Norton Warner <nortonwarner@gmail.com>

Diffstat:
Msrc/global.c | 2+-
Msrc/nano.h | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/global.c b/src/global.c @@ -1079,7 +1079,7 @@ void shortcut_init(void) /* Link key combos to functions in certain menus. */ add_to_sclist(MMOST|MBROWSER, "^M", 0, do_enter, 0); add_to_sclist(MMOST|MBROWSER, "Enter", KEY_ENTER, do_enter, 0); - add_to_sclist(MMOST, "^H", 0, do_backspace, 0); + add_to_sclist(MMOST, "^H", BS_CODE, 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, "^D", 0, do_delete, 0); diff --git a/src/nano.h b/src/nano.h @@ -570,6 +570,7 @@ enum #endif /* Basic control codes. */ +#define BS_CODE 0x08 #define TAB_CODE 0x09 #define ESC_CODE 0x1B #define DEL_CODE 0x7F