We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47b8d1b commit 3d8ac46Copy full SHA for 3d8ac46
lua/neo-tree/sources/filesystem/lib/fs_actions.lua
@@ -45,7 +45,7 @@ end
45
---@param new_buf number
46
local function replace_buffer_in_windows(old_buf, new_buf)
47
for _, win in ipairs(vim.api.nvim_list_wins()) do
48
- if vim.api.nvim_win_get_buf(win) == old_buf then
+ if vim.api.nvim_win_is_valid(win) and vim.api.nvim_win_get_buf(win) == old_buf then
49
vim.api.nvim_win_set_buf(win, new_buf)
50
end
51
0 commit comments