From 57252a4a56f3e5debcd953e69fd3b7e614c40cc6 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 2 Feb 2016 15:01:00 +0100 Subject: [PATCH] Check if to be deleted session even exists --- autoload/startify.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/startify.vim b/autoload/startify.vim index 9cd8c99..126471c 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -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