diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-17 10:19:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 10:19:56 +0800 |
commit | dc9f7b814517045b5354364655f660aae0989710 (patch) | |
tree | ad5cc30e6ddb2202fb7e15aa081d9a7c7efb06d4 /src/nvim/buffer.c | |
parent | 86c2213b5e451b0c80c2d7adc356c7cebe4bb7f8 (diff) | |
parent | 790bd4d5858713e8503825892c7d08340d189370 (diff) | |
download | rneovim-dc9f7b814517045b5354364655f660aae0989710.tar.gz rneovim-dc9f7b814517045b5354364655f660aae0989710.tar.bz2 rneovim-dc9f7b814517045b5354364655f660aae0989710.zip |
Merge pull request #26083 from zeertzjq/vim-9.0.1854
vim-patch:9.0.{1854,1857,1858,partial:1859,1860,1864,1868,1872,1873,1878,1881,1882,1969,1992,2004,2010,2106}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 6617907f8f..6d5c7a1766 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -4223,6 +4223,10 @@ bool buf_contents_changed(buf_T *buf) aco_save_T aco; aucmd_prepbuf(&aco, newbuf); + // We don't want to trigger autocommands now, they may have nasty + // side-effects like wiping buffers + block_autocmds(); + if (ml_open(curbuf) == OK && readfile(buf->b_ffname, buf->b_fname, 0, 0, (linenr_T)MAXLNUM, @@ -4247,6 +4251,8 @@ bool buf_contents_changed(buf_T *buf) wipe_buffer(newbuf, false); } + unblock_autocmds(); + return differ; } |