mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:00:04 +08:00
fix(projectmanager): skip when &autochdir is true
close https://github.com/SpaceVim/SpaceVim/issues/4858
This commit is contained in:
parent
64ecde0532
commit
f73abd9343
@ -364,6 +364,7 @@ else
|
||||
if bufname('%') =~# '\[denite\]'
|
||||
\ || bufname('%') ==# 'denite-filter'
|
||||
\ || bufname('%') ==# '\[defx\]'
|
||||
\ || &autochdir == 1
|
||||
return
|
||||
endif
|
||||
if join(g:spacevim_project_rooter_patterns, ':') !=# join(s:spacevim_project_rooter_patterns, ':')
|
||||
|
@ -420,6 +420,7 @@ function M.current_root()
|
||||
or bufname:match('^git://') -- this is for git.vim
|
||||
or vim.fn.empty(bufname) == 1
|
||||
or bufname:match('^neo%-tree') -- this is for neo-tree.nvim
|
||||
or vim.o.autochdir
|
||||
then
|
||||
return fn.getcwd()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user