files: don't ask "save anyway" when user orders to discard the buffer
This extra question was included upon Chris' request, but I find it confusing and angering.
This commit is contained in:
13
src/files.c
13
src/files.c
@@ -2157,19 +2157,10 @@ int do_writeout(bool exiting)
|
|||||||
} else {
|
} else {
|
||||||
functionptrtype func = func_from_key(&i);
|
functionptrtype func = func_from_key(&i);
|
||||||
|
|
||||||
/* Upon request, abandon the buffer, if user is sure. */
|
/* Upon request, abandon the buffer. */
|
||||||
if (func == discard_buffer) {
|
if (func == discard_buffer) {
|
||||||
if (openfile->modified)
|
|
||||||
i = do_yesno_prompt(FALSE,
|
|
||||||
_("Save modified buffer anyway? "));
|
|
||||||
else
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
if (i == 0) {
|
|
||||||
free(given);
|
free(given);
|
||||||
return 2; /* Yes, discard the buffer. */
|
return 2;
|
||||||
} else
|
|
||||||
continue; /* Go back to the filename prompt. */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
given = mallocstrcpy(given, answer);
|
given = mallocstrcpy(given, answer);
|
||||||
|
|||||||
Reference in New Issue
Block a user