Skip to content

Commit cfc5bdf

Browse files
committed
Pull request #45: Don't ask to forget when not recalling last session
1 parent af17c5d commit cfc5bdf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

autoload/xolox/session.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Last Change: May 26, 2013
44
" URL: http://peterodding.com/code/vim/session/
55

6-
let g:xolox#session#version = '2.3.8'
6+
let g:xolox#session#version = '2.3.9'
77

88
" Public API for session persistence. {{{1
99

@@ -331,7 +331,10 @@ function! xolox#session#auto_load() " {{{2
331331
\ is_default_session ? 'default' : 'last used',
332332
\ is_default_session ? '' : printf(' (%s)', session))
333333
" Prepare the list of choices.
334-
let choices = ['&Yes', '&No', '&Forget']
334+
let choices = ['&Yes', '&No']
335+
if g:session_default_to_last && has_last_session
336+
call add(choices, '&Forget')
337+
endif
335338
" Prompt the user (if not configured otherwise).
336339
let choice = s:prompt(msg, choices, 'g:session_autoload')
337340
if choice == 1

0 commit comments

Comments
 (0)