Skip to content

Commit a517959

Browse files
committed
fix: remove change_dir window event check
fixes #673. Not sure why this check was added in the first place, but some testing made me realize maybe it wasn't useful.
1 parent dbd1343 commit a517959

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lua/nvim-tree/lib.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,9 @@ function M.collapse_all()
460460
end
461461

462462
function M.change_dir(name)
463-
local changed_win = vim.v.event and vim.v.event.changed_window
464463
local foldername = name == '..' and vim.fn.fnamemodify(M.Tree.cwd, ':h') or name
465464
local no_cwd_change = vim.fn.expand(foldername) == M.Tree.cwd
466-
if changed_win or no_cwd_change then
465+
if no_cwd_change then
467466
return
468467
end
469468

0 commit comments

Comments
 (0)