File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function M.change_root(filepath, bufnr)
4141 -- test if in vim_cwd
4242 if utils .path_relative (filepath , vim_cwd ) ~= filepath then
4343 if vim_cwd ~= cwd then
44- lib . open (vim_cwd )
44+ change_dir . fn (vim_cwd )
4545 end
4646 return
4747 end
@@ -52,19 +52,19 @@ function M.change_root(filepath, bufnr)
5252
5353 -- otherwise test M.init_root
5454 if _config .prefer_startup_root and utils .path_relative (filepath , M .init_root ) ~= filepath then
55- lib . open (M .init_root )
55+ change_dir . fn (M .init_root )
5656 return
5757 end
5858 -- otherwise root_dirs
5959 for _ , dir in pairs (_config .root_dirs ) do
6060 dir = vim .fn .fnamemodify (dir , " :p" )
6161 if utils .path_relative (filepath , dir ) ~= filepath then
62- lib . open (dir )
62+ change_dir . fn (dir )
6363 return
6464 end
6565 end
6666 -- finally fall back to the folder containing the file
67- lib . open (vim .fn .fnamemodify (filepath , " :p:h" ))
67+ change_dir . fn (vim .fn .fnamemodify (filepath , " :p:h" ))
6868end
6969
7070--- @deprecated
You can’t perform that action at this time.
0 commit comments