mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 20:30:05 +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\]'
|
if bufname('%') =~# '\[denite\]'
|
||||||
\ || bufname('%') ==# 'denite-filter'
|
\ || bufname('%') ==# 'denite-filter'
|
||||||
\ || bufname('%') ==# '\[defx\]'
|
\ || bufname('%') ==# '\[defx\]'
|
||||||
|
\ || &autochdir == 1
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
if join(g:spacevim_project_rooter_patterns, ':') !=# join(s:spacevim_project_rooter_patterns, ':')
|
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 bufname:match('^git://') -- this is for git.vim
|
||||||
or vim.fn.empty(bufname) == 1
|
or vim.fn.empty(bufname) == 1
|
||||||
or bufname:match('^neo%-tree') -- this is for neo-tree.nvim
|
or bufname:match('^neo%-tree') -- this is for neo-tree.nvim
|
||||||
|
or vim.o.autochdir
|
||||||
then
|
then
|
||||||
return fn.getcwd()
|
return fn.getcwd()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user