commit fb78eea6fc86bb643ae48d9bcbd349e73c337ebe
parent a942be9f6f3b03c7368f48e797416756a9f3a1db
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 5 May 2025 12:45:49 +0200
bindings: always bind ^Q in the WriteOut menu, not only for --saveonexit
This gives the user a keystroke combo (for abandonning a buffer) that is
always the same, no matter whether the buffer is modified or not: ^O^Q.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/global.c b/src/global.c
@@ -1515,7 +1515,7 @@ void shortcut_init(void)
add_to_sclist(MBROWSER, "M-G", 0, goto_dir, 0);
add_to_sclist(MBROWSER, "^_", 0, goto_dir, 0);
#endif
- if (ISSET(SAVE_ON_EXIT) && !ISSET(PRESERVE))
+ if (!ISSET(PRESERVE))
add_to_sclist(MWRITEFILE, "^Q", 0, discard_buffer, 0);
#ifndef NANO_TINY
add_to_sclist(MWRITEFILE, "M-D", 0, dos_format, 0);