1
0
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:
Eric Wong 2024-06-30 22:37:23 +08:00
parent 64ecde0532
commit f73abd9343
2 changed files with 2 additions and 0 deletions

View File

@ -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, ':')

View File

@ -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