File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
lua/nvim-tree/actions/node Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -167,11 +167,14 @@ local function pick_win_id()
167167
168168 if laststatus == 3 then
169169 for _ , id in ipairs (not_selectable ) do
170- for opt , value in pairs (win_opts [id ]) do
171- if vim .fn .has " nvim-0.10" == 1 then
172- vim .api .nvim_set_option_value (opt , value , { win = id })
173- else
174- vim .api .nvim_win_set_option (id , opt , value ) --- @diagnostic disable-line : deprecated
170+ -- Ensure window still exists at this point
171+ if vim .api .nvim_win_is_valid (id ) then
172+ for opt , value in pairs (win_opts [id ]) do
173+ if vim .fn .has " nvim-0.10" == 1 then
174+ vim .api .nvim_set_option_value (opt , value , { win = id })
175+ else
176+ vim .api .nvim_win_set_option (id , opt , value ) --- @diagnostic disable-line : deprecated
177+ end
175178 end
176179 end
177180 end
You can’t perform that action at this time.
0 commit comments