nano

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

commit d0a1bc361a7b8a158eeb03cb2a246ae37e81e6d9
parent d35650b034dc76cf7ecb97d7bc544dffff6a9dd8
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 30 Jan 2024 08:12:31 +0100

help: restore ^H and ^D as the primary shortcuts for Backspace and Delete

Commit 18b37c98 moved the bindings of ^H and ^D further down.  Now move
the bindings of <Bsp> and <Del> to after those, so that ^H and ^D will
be shown again first in the help text (when not using --modernbindings).

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

diff --git a/src/global.c b/src/global.c @@ -1173,9 +1173,6 @@ void shortcut_init(void) /* Link key combos to functions in certain menus. */ add_to_sclist(MMOST|MBROWSER, "^M", '\r', do_enter, 0); add_to_sclist(MMOST|MBROWSER, "Enter", KEY_ENTER, do_enter, 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, "Del", KEY_DC, do_delete, 0); add_to_sclist(MMOST, "^I", '\t', do_tab, 0); add_to_sclist(MMOST, "Tab", '\t', do_tab, 0); if (ISSET(MODERN_BINDINGS)) { @@ -1218,6 +1215,9 @@ void shortcut_init(void) add_to_sclist(MMOST, "^H", '\b', do_backspace, 0); add_to_sclist(MMOST, "^D", 0, do_delete, 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, "Del", KEY_DC, do_delete, 0); add_to_sclist(MMAIN, "Ins", KEY_IC, do_insertfile, 0); add_to_sclist(MMAIN|MBROWSER|MHELP, "^B", 0, do_search_backward, 0); add_to_sclist(MMAIN|MBROWSER|MHELP, "^F", 0, do_search_forward, 0);