Просмотр исходного кода

merge pull request from athaeryn

Closes #19.
Marco Hinz 12 лет назад
Родитель
Сommit
679b3284a5
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      autoload/startify.vim

+ 6 - 0
autoload/startify.vim

@@ -36,6 +36,9 @@ function! startify#delete_session(...) abort
   if !isdirectory(g:startify_session_dir)
   if !isdirectory(g:startify_session_dir)
     echo 'The session directory does not exist: '. g:startify_session_dir
     echo 'The session directory does not exist: '. g:startify_session_dir
     return
     return
+  elseif empty(startify#get_session_names_as_string(''))
+    echo 'There are no sessions...'
+    return
   endif
   endif
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
         \ ? a:1
         \ ? a:1
@@ -88,6 +91,9 @@ function! startify#load_session(...) abort
   if !isdirectory(g:startify_session_dir)
   if !isdirectory(g:startify_session_dir)
     echo 'The session directory does not exist: '. g:startify_session_dir
     echo 'The session directory does not exist: '. g:startify_session_dir
     return
     return
+  elseif empty(startify#get_session_names_as_string(''))
+    echo 'There are no sessions...'
+    return
   endif
   endif
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
         \ ? a:1
         \ ? a:1