浏览代码

User some helper variables

Marco Hinz 12 年之前
父节点
当前提交
8c09725d03
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      autoload/startify.vim

+ 7 - 4
autoload/startify.vim

@@ -411,13 +411,16 @@ endfunction
 
 " Function: s:check_user_options {{{1
 function! s:check_user_options() abort
-  let path = expand('%') . s:sep .'Session.vim'
+  let path    = expand('%')
+  let session = path . s:sep .'Session.vim'
+
+  echom '>>> '. path
   " autoload session
-  if get(g:, 'startify_session_autoload') && filereadable(path)
-    execute 'source' path
+  if get(g:, 'startify_session_autoload') && filereadable(session)
+    execute 'source' session
   " change directory
   elseif get(g:, 'startify_change_to_dir', 1)
-    if isdirectory(expand('%'))
+    if isdirectory(path)
       lcd %
     else
       lcd %:h