소스 검색

Fix autoloading of sessions from bookmarked directories

References #144.
Marco Hinz 11 년 전
부모
커밋
362fa1d957
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      autoload/startify.vim
  2. 2 0
      doc/startify.txt

+ 3 - 1
autoload/startify.vim

@@ -570,7 +570,9 @@ function! s:check_user_options() abort
   let session = path . s:sep .'Session.vim'
   let session = path . s:sep .'Session.vim'
 
 
   " change to VCS root directory
   " change to VCS root directory
-  if get(g:, 'startify_change_to_vcs_root')
+  if get(g:, 'startify_session_autoload') && filereadable(session)
+    execute 'source' session
+  elseif get(g:, 'startify_change_to_vcs_root')
     call s:cd_to_vcs_root(path)
     call s:cd_to_vcs_root(path)
   " change directory
   " change directory
   elseif get(g:, 'startify_change_to_dir', 1)
   elseif get(g:, 'startify_change_to_dir', 1)

+ 2 - 0
doc/startify.txt

@@ -198,6 +198,8 @@ If you fire up "vim" in a directory that contains a "Session.vim", that session
 will be loaded automatically. Otherwise it will be shown as the top entry in
 will be loaded automatically. Otherwise it will be shown as the top entry in
 the Startify buffer.
 the Startify buffer.
 
 
+This also works if you open a bookmarked directory.
+
 Great way to create a portable project folder.
 Great way to create a portable project folder.
 
 
 ------------------------------------------------------------------------------
 ------------------------------------------------------------------------------