From a0eebf20db7b00a50e5fabd36961dba2e81edf8e Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 31 Jan 2024 08:31:56 +0100 Subject: [PATCH] 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. --- src/global.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/global.c b/src/global.c index a2cb9174..c4d0d314 100644 --- 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