diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-06-22 08:35:28 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-22 08:35:28 +0200 |
commit | e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1 (patch) | |
tree | 3bfaaf5fdba2d6c01288880f865620db1d6c1a88 /src/nvim/fileio.c | |
parent | b7514493a0c4a4389a5921f15b0b429dae5c75e7 (diff) | |
parent | eaf2a25f12342622414b264870f41939fe41355a (diff) | |
download | rneovim-e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1.tar.gz rneovim-e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1.tar.bz2 rneovim-e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1.zip |
Merge #8618 'Replace b_changedtick with always-inline functions'
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 3b6a3a7995..5ddb3952de 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -3566,13 +3566,13 @@ restore_backup: * writing to the original file and '+' is not in 'cpoptions'. */ if (reset_changed && whole && !append && !write_info.bw_conv_error - && (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL) - ) { - unchanged(buf, TRUE); - /* buf->b_changedtick is always incremented in unchanged() but that - * should not trigger a TextChanged event. */ - if (buf->b_last_changedtick + 1 == buf->b_changedtick) { - buf->b_last_changedtick = buf->b_changedtick; + && (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL)) { + unchanged(buf, true); + const varnumber_T changedtick = buf_get_changedtick(buf); + if (buf->b_last_changedtick + 1 == changedtick) { + // changedtick is always incremented in unchanged() but that + // should not trigger a TextChanged event. + buf->b_last_changedtick = changedtick; } u_unchanged(buf); u_update_save_nr(buf); |