commit 1c074cc8cc9002f2f044be809a5e901046970411
parent ebf6228f218ab2b56eb40bc9a42c06c8ec70c7e2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 21 Jan 2022 15:44:07 +0100
files: let ^C cancel the exiting when the file on disk was changed
When the user exits with ^X and gets warned that the file on disk
has changed, then typing ^C at the question whether to continue
saving should not discard the buffer and exit, but should return
the user to the filename prompt.
This fixes https://savannah.gnu.org/bugs/?61883.
Reported-by: Tasos Papastylianou <tpapastylianou@hotmail.com>
Bug existed since version 2.9.0, commit 217cfbf3.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -2306,6 +2306,8 @@ int write_it_out(bool exiting, bool withprompt)
return 2;
else
return 0;
+ } else if (choice < 0 && exiting) {
+ continue;
} else if (choice != 1) {
free(given);
return 1;