aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-17 06:33:13 +0800
committerGitHub <noreply@github.com>2024-08-17 06:33:13 +0800
commit4afd4061a23c60de26818bc3847e50c791a8f26c (patch)
treeba39530bb13e1eb48760f76f8ed7a72385eadbc7 /src/nvim/buffer.c
parent8b8096500d08d771a936d8ceca25ef5716c3874f (diff)
parent7df6fbb096b4bedef386236213d72daf45d876aa (diff)
downloadrneovim-4afd4061a23c60de26818bc3847e50c791a8f26c.tar.gz
rneovim-4afd4061a23c60de26818bc3847e50c791a8f26c.tar.bz2
rneovim-4afd4061a23c60de26818bc3847e50c791a8f26c.zip
Merge pull request #30068 from zeertzjq/vim-9.1.0678
vim-patch:9.1.{0678,0679}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index ab648708fc..f986f558a9 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1379,7 +1379,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
// When the autocommand window is involved win_close() may need to print an error message.
// Repeat this so long as we end up in a window with this buffer.
while (buf == curbuf
- && !(curwin->w_closing || curwin->w_buffer->b_locked > 0)
+ && !(win_locked(curwin) || curwin->w_buffer->b_locked > 0)
&& (is_aucmd_win(lastwin) || !last_window(curwin))) {
if (win_close(curwin, false, false) == FAIL) {
break;
@@ -3644,7 +3644,7 @@ void ex_buffer_all(exarg_T *eap)
: wp->w_width != Columns)
|| (had_tab > 0 && wp != firstwin))
&& !ONE_WINDOW
- && !(wp->w_closing || wp->w_buffer->b_locked > 0)
+ && !(win_locked(curwin) || wp->w_buffer->b_locked > 0)
&& !is_aucmd_win(wp)) {
if (win_close(wp, false, false) == FAIL) {
break;