Check if to be deleted session even exists

This commit is contained in:
Marco Hinz 2016-02-02 15:01:00 +01:00
parent 7994cae378
commit 57252a4a56

View file

@ -325,6 +325,11 @@ function! startify#session_delete(bang, ...) abort
\ | redraw
call inputrestore()
if !filereadable(spath)
echomsg 'No such session: '. spath
return
endif
echo 'Really delete '. spath .'? [y/n]' | redraw
if a:bang || nr2char(getchar()) == 'y'
if delete(spath) == 0