shutdown: ignore a modified buffer when in view mode
In view mode it should be impossible to modify any buffer, but... when (through some bug) the user did succeed in modifying a buffer, this should not lead to writing out this modified buffer to disk. Had this safety stop been present earlier, it would have prevented the second part of https://savannah.gnu.org/bugs/?63616.
Этот коммит содержится в:
родитель
078d612b9e
Коммит
0662fc4d42
@ -303,7 +303,7 @@ void do_exit(void)
|
||||
|
||||
/* When unmodified, simply close. Else, when doing automatic saving
|
||||
* and the file has a name, simply save. Otherwise, ask the user. */
|
||||
if (!openfile->modified)
|
||||
if (!openfile->modified || ISSET(VIEW_MODE))
|
||||
choice = NO;
|
||||
else if (ISSET(SAVE_ON_EXIT) && openfile->filename[0] != '\0')
|
||||
choice = YES;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user