From fb78eea6fc86bb643ae48d9bcbd349e73c337ebe Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 5 May 2025 12:45:49 +0200 Subject: [PATCH] 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. --- src/global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global.c b/src/global.c index 5bc5b017..d9c6db2e 100644 --- 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);