We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa99717 commit 31d8e24Copy full SHA for 31d8e24
lua/nvim-tree/actions/root/change-dir.lua
@@ -63,12 +63,12 @@ local function add_profiling_to(f)
63
end
64
65
M.force_dirchange = add_profiling_to(function(foldername, should_open_view)
66
- if should_change_dir() then
+ local valid_dir = vim.fn.isdirectory(foldername) == 1 -- prevent problems on non existing dirs
67
+ if should_change_dir() and valid_dir then
68
cd(M.options.global, foldername)
69
+ core.init(foldername)
70
71
- core.init(foldername)
-
72
if should_open_view then
73
require("nvim-tree.lib").open()
74
else
0 commit comments