File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33" Last Change: May 4, 2013
44" URL: http://peterodding.com/code/vim/session/
55
6- let g: xolox #session#version = ' 1.7.2 '
6+ let g: xolox #session#version = ' 1.7.3 '
77
88call xolox#misc#compat#check (' session' , 2 )
99
@@ -250,7 +250,10 @@ function! xolox#session#auto_load() " {{{2
250250 return
251251 endif
252252 " 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)
254257 " Check whether a session matching the user-specified server name exists.
255258 if v: servername !~ ' ^\cgvim\d*$'
256259 for session in xolox#session#get_names ()
You can’t perform that action at this time.
0 commit comments