* Fixing #2057 * Update change-dir.lua * Fixing error in force_dir_change
This commit is contained in:
parent
aa9971768a
commit
31d8e24460
@ -63,12 +63,12 @@ local function add_profiling_to(f)
|
||||
end
|
||||
|
||||
M.force_dirchange = add_profiling_to(function(foldername, should_open_view)
|
||||
if should_change_dir() then
|
||||
local valid_dir = vim.fn.isdirectory(foldername) == 1 -- prevent problems on non existing dirs
|
||||
if should_change_dir() and valid_dir then
|
||||
cd(M.options.global, foldername)
|
||||
core.init(foldername)
|
||||
end
|
||||
|
||||
core.init(foldername)
|
||||
|
||||
if should_open_view then
|
||||
require("nvim-tree.lib").open()
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user