File tree 1 file changed +8
-5
lines changed
lua/nvim-tree/actions/node
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()
167
167
168
168
if laststatus == 3 then
169
169
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
175
178
end
176
179
end
177
180
end
You can’t perform that action at this time.
0 commit comments