From edfe0cf1f6a526d5f6c6aebe4ddba48b15e7b82b Mon Sep 17 00:00:00 2001
From: Marco Hinz <mh.codebro@gmail.com>
Date: Mon, 13 May 2013 00:02:17 +0200
Subject: [PATCH] Make commands remember last used session

Closes #20.
---
 autoload/startify.vim | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/autoload/startify.vim b/autoload/startify.vim
index 3496e80..9afd931 100644
--- a/autoload/startify.vim
+++ b/autoload/startify.vim
@@ -58,7 +58,7 @@ function! startify#delete_session(...) abort
   endif
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
         \ ? a:1
-        \ : input('Delete this session: ', '', 'custom,startify#get_session_names_as_string'))
+        \ : input('Delete this session: ', fnamemodify(v:this_session, ':t'), 'custom,startify#get_session_names_as_string'))
         \ | redraw
   echo 'Really delete '. spath .'? [y/n]' | redraw
   if (nr2char(getchar()) == 'y')
@@ -90,7 +90,7 @@ function! startify#save_session(...) abort
   endif
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
         \ ? a:1
-        \ : input('Save under this session name: ', '', 'custom,startify#get_session_names_as_string'))
+        \ : input('Save under this session name: ', fnamemodify(v:this_session, ':t'), 'custom,startify#get_session_names_as_string'))
         \ | redraw
   let spath = startify#escape(spath)
   if !filereadable(spath)
@@ -116,7 +116,7 @@ function! startify#load_session(...) abort
   endif
   let spath = g:startify_session_dir . startify#get_separator() . (exists('a:1')
         \ ? a:1
-        \ : input('Load this session: ', '', 'custom,startify#get_session_names_as_string'))
+        \ : input('Load this session: ', fnamemodify(v:this_session, ':t'), 'custom,startify#get_session_names_as_string'))
         \ | redraw
   if filereadable(spath)
     execute 'source '. startify#escape(spath)