diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-07-04 11:00:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 11:00:48 -0400 |
commit | 18bfcfe77f007f146a7251aa3cc6129891390c30 (patch) | |
tree | 741849ac08038690779f833bb33d204ba4978eee /src/nvim/buffer.c | |
parent | 490615612ed5ec587c8023de28db495b3181de30 (diff) | |
parent | 0d75b0d8d470fdf763743823feb6d9013eff069c (diff) | |
download | rneovim-18bfcfe77f007f146a7251aa3cc6129891390c30.tar.gz rneovim-18bfcfe77f007f146a7251aa3cc6129891390c30.tar.bz2 rneovim-18bfcfe77f007f146a7251aa3cc6129891390c30.zip |
Merge pull request #14981 from janlazo/vim-8.2.3081
vim-patch:8.2.{3081,3082,3085,3087,3088,3093,3094,3097,3098}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index f1f32076bf..8decd02b3a 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -901,7 +901,10 @@ void handle_swap_exists(bufref_T *old_curbuf) if (old_curbuf == NULL || !bufref_valid(old_curbuf) || old_curbuf->br_buf == curbuf) { + // Block autocommands here because curwin->w_buffer is NULL. + block_autocmds(); buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED); + unblock_autocmds(); } else { buf = old_curbuf->br_buf; } |