mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
fix(buffer): disable buffer-updates before removing from window #18933
There can be other places that access window buffer info (e.g. `tabpagebuflist()`), so checking `w_closing` in `win_findbuf()` doesn't solve the crash in all cases, and may also cause Nvim's behavior to diverge from Vim. Fix #14998
This commit is contained in:
@@ -7297,7 +7297,7 @@ void win_findbuf(typval_T *argvars, list_T *list)
|
||||
int bufnr = tv_get_number(&argvars[0]);
|
||||
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp) {
|
||||
if (!wp->w_closing && wp->w_buffer->b_fnum == bufnr) {
|
||||
if (wp->w_buffer->b_fnum == bufnr) {
|
||||
tv_list_append_number(list, wp->handle);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user