nano

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

commit a0eebf20db7b00a50e5fabd36961dba2e81edf8e
parent b84f6fc15f25e7bdd450fb4128ef0d4979aaff16
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 31 Jan 2024 08:31:56 +0100

bindings: in the tiny version, bind M-6 only in main, not at the prompts

This prevents M-6 from unexpectedly exiting from the prompt
and then copying a line in the edit window.

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

diff --git a/src/global.c b/src/global.c @@ -1227,14 +1227,16 @@ void shortcut_init(void) add_to_sclist(MMAIN, "^\\", 0, do_replace, 0); add_to_sclist(MMAIN, "M-R", 0, do_replace, 0); add_to_sclist(MMOST, "^K", 0, cut_text, 0); - add_to_sclist(MMOST, "M-6", 0, copy_text, 0); - add_to_sclist(MMOST, "M-^", 0, copy_text, 0); #ifdef NANO_TINY + add_to_sclist(MMAIN, "M-6", 0, copy_text, 0); + add_to_sclist(MMAIN, "M-^", 0, copy_text, 0); add_to_sclist(MMAIN, "^U", 0, paste_text, 0); #ifdef ENABLE_SPELLER add_to_sclist(MMAIN, ISSET(MODERN_BINDINGS) ? "^E" : "^T", 0, do_spell, 0); #endif #else + add_to_sclist(MMOST, "M-6", 0, copy_text, 0); + add_to_sclist(MMOST, "M-^", 0, copy_text, 0); add_to_sclist(MMOST, "^U", 0, paste_text, 0); add_to_sclist(MMAIN, ISSET(MODERN_BINDINGS) ? "^E" : "^T", 0, do_execute, 0); #ifdef ENABLE_SPELLER