mirror of
https://github.com/neovim/neovim.git
synced 2026-03-29 11:52:04 +00:00
fix: :ball w_locked check, reset b_nwindows in free_all_mem() #38484
Problem: - Small error in port of v9.1.0678, causing :ball to check w_locked for the wrong window. - After #27439, free_all_mem() may not wipe out buffers that were open in more than one window before windows were freed. Solution: - Check win_locked() for wp in ex_buffer_all(), not curwin. - Set b_nwindows to 0 in free_all_mem() before calling close_buffer(). Ref: https://github.com/neovim/neovim/pull/38473#issuecomment-4125117681 No need to block these fixes on that. free_all_mem() change also looks like it fixed the existing "N lua references were leaked!" warnings on the CI.
This commit is contained in:
@@ -3663,7 +3663,7 @@ void ex_buffer_all(exarg_T *eap)
|
||||
: wp->w_width != Columns)
|
||||
|| (had_tab > 0 && wp != firstwin))
|
||||
&& !ONE_WINDOW
|
||||
&& !(win_locked(curwin) || wp->w_buffer->b_locked > 0)
|
||||
&& !(win_locked(wp) || wp->w_buffer->b_locked > 0)
|
||||
&& !is_aucmd_win(wp)) {
|
||||
if (win_close(wp, false, false) == FAIL) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user