From 83c5701fe6d182c2f458b95d09114d9c861f8893 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 31 Aug 2019 14:06:45 +0200 Subject: 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. https://github.com/vim/vim/commit/c024b4667875e5bc6fd0ed791530e33c3161bff7 --- src/nvim/ex_cmds2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/ex_cmds2.c') diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 691ad74100..18df168c57 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -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); } } } -- cgit