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