Skip to content

Commit 4995699

Browse files
committed
fix(explorer): correctly check config.actions.change_dir for change_dir related methods
1 parent fd300ed commit 4995699

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ end
724724
---@private
725725
---@return boolean
726726
function Explorer:should_change_dir()
727-
return config.enable and vim.tbl_isempty(vim.v.event)
727+
return config.actions.change_dir.enable and vim.tbl_isempty(vim.v.event)
728728
end
729729

730730
---@private
@@ -743,7 +743,7 @@ function Explorer:force_dirchange(foldername, should_open_view)
743743
local valid_dir = vim.fn.isdirectory(foldername) == 1 -- prevent problems on non existing dirs
744744
if valid_dir then
745745
if self:should_change_dir() then
746-
self:cd(config.global, foldername)
746+
self:cd(config.actions.change_dir.global, foldername)
747747
end
748748
core.init(foldername)
749749
end

0 commit comments

Comments
 (0)