From efb79ebed97a9f9df36724e396ed0e129687dbc1 Mon Sep 17 00:00:00 2001 From: AkaiBureido Date: Wed, 29 May 2013 15:51:18 -0700 Subject: [PATCH] Do no concatenate sname to spath prior empty check --- autoload/startify.vim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 8cee517..e73f2da 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -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