mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 21:10:05 +08:00
fix(shell): fix default cwd of terminal
close https://github.com/SpaceVim/SpaceVim/issues/4644
This commit is contained in:
parent
d42fb9bda6
commit
8f1f93350e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user