1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 23:50:04 +08:00

fix(shell): fix default cwd of terminal

close https://github.com/SpaceVim/SpaceVim/issues/4644
This commit is contained in:
wsdjeg 2022-04-21 23:41:00 +08:00
parent d42fb9bda6
commit 8f1f93350e

View File

@ -159,6 +159,11 @@ function! s:open_default_shell(open_with_file_cwd) abort
endif
else
let path = SpaceVim#plugins#projectmanager#current_root()
" if the current file is not in a project, the projectmanager return empty
" string. Then use current directory as default cwd.
if empty(path)
let path = getcwd()
endif
endif
" look for already opened terminal windows