Merge pull request #22 from AkaiBureido

Closes #22.
This commit is contained in:
Marco Hinz 2013-05-30 09:19:03 +02:00
commit 24e8a70129

View file

@ -155,18 +155,17 @@ function! startify#session_save(...) abort
return
endif
endif
let spath = s:session_dir . startify#get_separator()
if exists('a:1')
let spath .= a:1
let sname = a:1
else
let spath .= input('Save under this session name: ', fnamemodify(v:this_session, ':t'), 'custom,startify#session_list_as_string')
let sname = input('Save under this session name: ', fnamemodify(v:this_session, ':t'), 'custom,startify#session_list_as_string')
redraw
if empty(spath)
if empty(sname)
echo 'You gave an empty name!'
return
endif
endif
let spath = s:escape(spath)
let spath = s:escape(s:session_dir . startify#get_separator() . sname)
if !filereadable(spath)
execute 'mksession '. spath | echo 'Session saved under: '. spath
return