tweaks: condense a comment, and reshuffle some conditions
parent
1c4dd79b9b
commit
07b48024d1
14
src/files.c
14
src/files.c
|
@ -2169,15 +2169,13 @@ int do_writeout(bool exiting, bool withprompt)
|
||||||
if (func == do_help) {
|
if (func == do_help) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_EXTRA
|
#ifdef ENABLE_EXTRA
|
||||||
/* If the current file has been modified, we've pressed
|
/* If the user pressed Ctrl-X in the edit window, and answered "Y" at
|
||||||
* Ctrl-X at the edit window to exit, we've pressed "y" at
|
* the "Save modified buffer?" prompt, and entered "zzy" as filename,
|
||||||
* the "Save modified buffer" prompt to save, we've entered
|
* and this is the first time around, show an Easter egg. */
|
||||||
* "zzy" as the filename to save under (hence "xyzzy"), and
|
if (exiting && !ISSET(SAVE_ON_EXIT) && openfile->filename[0] == '\0' &&
|
||||||
* this is the first time we've done this, show an Easter
|
strcmp(answer, "zzy") == 0 && !did_credits) {
|
||||||
* egg. Display the credits. */
|
|
||||||
if (!did_credits && exiting && !ISSET(SAVE_ON_EXIT) &&
|
|
||||||
openfile->filename[0] == '\0' && strcasecmp(answer, "zzy") == 0) {
|
|
||||||
if (LINES > 5 && COLS > 31) {
|
if (LINES > 5 && COLS > 31) {
|
||||||
do_credits();
|
do_credits();
|
||||||
did_credits = TRUE;
|
did_credits = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue