From 4ef4eb4f120b9da689172b1c7f41136a574c3102 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 8 Mar 2024 11:04:48 +0100 Subject: [PATCH] options: make --modernbindings actually override --preserve When modern bindings are requested, ^S should save and ^Q must exit, so --preserve and 'set preserve' need to be cancelled. This fixes https://savannah.gnu.org/bugs/?65433. Bug existed since commit 18b37c98, which introduced --modernbindings. --- src/nano.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nano.c b/src/nano.c index b580e3af..0eafdd8f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2253,6 +2253,10 @@ int main(int argc, char **argv) if (ISSET(RAW_SEQUENCES)) UNSET(USE_MOUSE); + /* When --modernbindings is used, ^Q and ^S need to be functional. */ + if (ISSET(MODERN_BINDINGS)) + UNSET(PRESERVE); + /* When suppressing title bar or minibar, suppress also the help lines. */ if (ISSET(ZERO)) SET(NO_HELP);