We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39fd225 commit a55f11cCopy full SHA for a55f11c
lua/neo-tree/sources/filesystem/lib/fs_actions.lua
@@ -24,7 +24,7 @@ local function clear_buffer(path)
24
local alt = vim.fn.bufnr("#")
25
-- Check all windows to see if they are using the buffer
26
for _, win in ipairs(vim.api.nvim_list_wins()) do
27
- if vim.api.nvim_win_get_buf(win) == buf then
+ if vim.api.nvim_win_is_valid(win) and vim.api.nvim_win_get_buf(win) == buf then
28
-- if there is no alternate buffer yet, create a blank one now
29
if alt < 1 or alt == buf then
30
alt = vim.api.nvim_create_buf(true, false)
0 commit comments