vim-patch:8.1.1498: ":write" increments b:changedtick even though nothing changed

Problem:    ":write" increments b:changedtick even though nothing changed.
            (Daniel Hahler)
Solution:   Only increment b:changedtick if the modified flag is reset.
c024b46678
This commit is contained in:
Justin M. Keyes
2019-08-31 14:06:45 +02:00
parent d7aea13fee
commit 83c5701fe6
7 changed files with 26 additions and 22 deletions

View File

@@ -1323,7 +1323,7 @@ void dialog_changed(buf_T *buf, bool checkall)
(void)buf_write_all(buf, false);
}
} else if (ret == VIM_NO) {
unchanged(buf, true);
unchanged(buf, true, false);
} else if (ret == VIM_ALL) {
// Write all modified files that can be written.
// Skip readonly buffers, these need to be confirmed
@@ -1348,7 +1348,7 @@ void dialog_changed(buf_T *buf, bool checkall)
} else if (ret == VIM_DISCARDALL) {
// mark all buffers as unchanged
FOR_ALL_BUFFERS(buf2) {
unchanged(buf2, true);
unchanged(buf2, true, false);
}
}
}