diff --git a/autoload/SpaceVim/layers/shell.vim b/autoload/SpaceVim/layers/shell.vim index 897dc3d9f..0d022d526 100644 --- a/autoload/SpaceVim/layers/shell.vim +++ b/autoload/SpaceVim/layers/shell.vim @@ -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