diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-23 22:33:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 22:33:44 +0800 |
commit | fcdfbb430377a82921cf1a72df97bce7952733e8 (patch) | |
tree | 64bec921bc8317d45c1160c786532684eb51808b /src/nvim/buffer.c | |
parent | 7bd6bd1ef7214942e94c9238e08619adf41f5995 (diff) | |
download | rneovim-fcdfbb430377a82921cf1a72df97bce7952733e8.tar.gz rneovim-fcdfbb430377a82921cf1a72df97bce7952733e8.tar.bz2 rneovim-fcdfbb430377a82921cf1a72df97bce7952733e8.zip |
fix(float): fix some other crashes with :unhide or :all (#25328)
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index f2174e055b..68cef67c8a 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3622,6 +3622,7 @@ void ex_buffer_all(exarg_T *eap) ? wp->w_prev->w_floating ? wp->w_prev : firstwin : (wp->w_next == NULL || wp->w_next->w_floating) ? NULL : wp->w_next; if ((wp->w_buffer->b_nwindows > 1 + || wp->w_floating || ((cmdmod.cmod_split & WSP_VERT) ? wp->w_height + wp->w_hsep_height + wp->w_status_height < Rows - p_ch - tabline_height() - global_stl_height() @@ -3656,6 +3657,7 @@ void ex_buffer_all(exarg_T *eap) // // Don't execute Win/Buf Enter/Leave autocommands here. autocmd_no_enter++; + // lastwin may be aucmd_win win_enter(lastwin_nofloating(), false); autocmd_no_leave++; for (buf = firstbuf; buf != NULL && open_wins < count; buf = buf->b_next) { @@ -3674,7 +3676,7 @@ void ex_buffer_all(exarg_T *eap) } else { // Check if this buffer already has a window for (wp = firstwin; wp != NULL; wp = wp->w_next) { - if (wp->w_buffer == buf) { + if (!wp->w_floating && wp->w_buffer == buf) { break; } } |