commit 32e63fe1b898aa4d9ededad7067cb7ad33cd4aa2
parent 1c074cc8cc9002f2f044be809a5e901046970411
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 22 Jan 2022 13:08:46 +0100
tweaks: add some small, clarifying comments
Suggested-by: Tasos Papastylianou <tpapastylianou@hotmail.com>
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -2299,16 +2299,16 @@ int write_it_out(bool exiting, bool withprompt)
* overwrite the file right here when requested. */
if (ISSET(SAVE_ON_EXIT) && withprompt) {
free(given);
- if (choice == 1)
+ if (choice == 1) /* Yes */
return write_file(openfile->filename, NULL,
NORMAL, OVERWRITE, NONOTES);
- else if (choice == 0)
+ else if (choice == 0) /* No -- discard buffer */
return 2;
else
return 0;
- } else if (choice < 0 && exiting) {
+ } else if (choice < 0 && exiting) { /* Cancel of ^X */
continue;
- } else if (choice != 1) {
+ } else if (choice < 1) { /* No or Cancel */
free(given);
return 1;
}