SSave: check for empty input
This commit is contained in:
parent
77aa5df09f
commit
ab8c15eb4c
|
@ -155,10 +155,16 @@ function! startify#session_save(...) abort
|
|||
return
|
||||
endif
|
||||
endif
|
||||
let spath = s:session_dir . startify#get_separator() . (exists('a:1')
|
||||
\ ? a:1
|
||||
\ : input('Save under this session name: ', fnamemodify(v:this_session, ':t'), 'custom,startify#session_list_as_string'))
|
||||
\ | redraw
|
||||
if exists('a:1')
|
||||
let spath = s:session_dir . startify#get_separator() . a:1
|
||||
else
|
||||
let i = input('Save under this session name: ', fnamemodify(v:this_session, ':t'), 'custom,startify#session_list_as_string')
|
||||
redraw
|
||||
if empty(i)
|
||||
echo 'You gave an invalid name!'
|
||||
return
|
||||
endif
|
||||
endif
|
||||
let spath = s:escape(spath)
|
||||
if !filereadable(spath)
|
||||
execute 'mksession '. spath | echo 'Session saved under: '. spath
|
||||
|
|
Loading…
Reference in a new issue