From f73abd93434abed8b0375d56c1bc2bb037bca42a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 30 Jun 2024 22:37:23 +0800 Subject: [PATCH] fix(projectmanager): skip when &autochdir is true close https://github.com/SpaceVim/SpaceVim/issues/4858 --- autoload/SpaceVim/plugins/projectmanager.vim | 1 + lua/spacevim/plugin/projectmanager.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/autoload/SpaceVim/plugins/projectmanager.vim b/autoload/SpaceVim/plugins/projectmanager.vim index d7f11ecd7..c84b26a7e 100644 --- a/autoload/SpaceVim/plugins/projectmanager.vim +++ b/autoload/SpaceVim/plugins/projectmanager.vim @@ -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, ':') diff --git a/lua/spacevim/plugin/projectmanager.lua b/lua/spacevim/plugin/projectmanager.lua index 5b253dffb..2b58bf2cc 100644 --- a/lua/spacevim/plugin/projectmanager.lua +++ b/lua/spacevim/plugin/projectmanager.lua @@ -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