diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-04 17:03:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 17:03:57 -0700 |
commit | 632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51 (patch) | |
tree | dfa1d1f1173fff6ac0e069f458b6e5956f31214e /src/nvim/fileio.c | |
parent | d7aea13fee879a5e7854f2ebe9b7321cd8daf84f (diff) | |
parent | d401539012f8222144b6873fd591baa232e8877c (diff) | |
download | rneovim-632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51.tar.gz rneovim-632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51.tar.bz2 rneovim-632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51.zip |
Merge #10946 from justinmk/vim-patchhhh
vim-patch:8.1.1498,8.1.1501: b:changedtick
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 8b19257d3d..b99a254fad 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -3485,10 +3485,10 @@ restore_backup: if (reset_changed && whole && !append && !write_info.bw_conv_error && (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL)) { - unchanged(buf, true); + unchanged(buf, true, false); const varnumber_T changedtick = buf_get_changedtick(buf); if (buf->b_last_changedtick + 1 == changedtick) { - // changedtick is always incremented in unchanged() but that + // b:changedtick may be incremented in unchanged() but that // should not trigger a TextChanged event. buf->b_last_changedtick = changedtick; } @@ -5107,14 +5107,14 @@ void buf_reload(buf_T *buf, int orig_mode) } (void)move_lines(savebuf, buf); } - } else if (buf == curbuf) { /* "buf" still valid */ - /* Mark the buffer as unmodified and free undo info. */ - unchanged(buf, TRUE); + } else if (buf == curbuf) { // "buf" still valid. + // Mark the buffer as unmodified and free undo info. + unchanged(buf, true, true); if ((flags & READ_KEEP_UNDO) == 0) { u_blockfree(buf); u_clearall(buf); } else { - /* Mark all undo states as changed. */ + // Mark all undo states as changed. u_unchanged(curbuf); } } |