aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-21 08:02:45 +0800
committerGitHub <noreply@github.com>2022-02-21 08:02:45 +0800
commit726ec7fb17aa8a86b1c2c9adc4c6abfcb350d3a7 (patch)
tree3e5715551c6e61d75ae8efe1a91cac17e4e089c8 /src/nvim/buffer.c
parentaeb390e28f6346009c5a67a9ea79161bc1e62dda (diff)
parentdcefd48c1b7023bb1dce25bf9f6cfce47edbe993 (diff)
downloadrneovim-726ec7fb17aa8a86b1c2c9adc4c6abfcb350d3a7.tar.gz
rneovim-726ec7fb17aa8a86b1c2c9adc4c6abfcb350d3a7.tar.bz2
rneovim-726ec7fb17aa8a86b1c2c9adc4c6abfcb350d3a7.zip
Merge pull request #17403 from zeertzjq/vim-8.1.1955
vim-patch:8.1.{1846,1955},8.2.0156
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index aada11bc9e..dd40623af2 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1441,7 +1441,7 @@ void set_curbuf(buf_T *buf, int action)
set_bufref(&prevbufref, prevbuf);
set_bufref(&newbufref, buf);
- // Autocommands may delete the curren buffer and/or the buffer we want to go
+ // Autocommands may delete the current buffer and/or the buffer we want to go
// to. In those cases don't close the buffer.
if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, false, curbuf)
|| (bufref_valid(&prevbufref) && bufref_valid(&newbufref)
@@ -1454,6 +1454,7 @@ void set_curbuf(buf_T *buf, int action)
}
if (bufref_valid(&prevbufref) && !aborting()) {
win_T *previouswin = curwin;
+
// Do not sync when in Insert mode and the buffer is open in
// another window, might be a timer doing something in another
// window.