File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3
3
" Last Change: May 4, 2013
4
4
" URL: http://peterodding.com/code/vim/session/
5
5
6
- let g: xolox #session#version = ' 1.7.2 '
6
+ let g: xolox #session#version = ' 1.7.3 '
7
7
8
8
call xolox#misc#compat#check (' session' , 2 )
9
9
@@ -250,7 +250,10 @@ function! xolox#session#auto_load() " {{{2
250
250
return
251
251
endif
252
252
" Check that the user has started Vim without editing any files.
253
- if bufnr (' $' ) == 1 && bufname (' %' ) == ' ' && ! &mod && getline (1 , ' $' ) == [' ' ]
253
+ let current_buffer_is_empty = (&modified == 0 && getline (1 , ' $' ) == [' ' ])
254
+ let buffer_list_is_empty = (bufnr (' $' ) == 1 && bufname (' %' ) == ' ' )
255
+ let buffer_list_is_persistent = (index (xolox#misc#option#split (&viminfo ), ' %' ) >= 0 )
256
+ if current_buffer_is_empty && (buffer_list_is_empty || buffer_list_is_persistent)
254
257
" Check whether a session matching the user-specified server name exists.
255
258
if v: servername !~ ' ^\cgvim\d*$'
256
259
for session in xolox#session#get_names ()
You can’t perform that action at this time.
0 commit comments