Skip to content

Commit da040dd

Browse files
committed
Merge pull request #95: No prompt for session auto-load when unloaded buffers exist
2 parents 5338653 + e497a6d commit da040dd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac
246246
<!-- Start of generated documentation -->
247247

248248
The documentation of the 34 functions below was extracted from
249-
1 Vim scripts on June 18, 2014 at 22:49.
249+
1 Vim scripts on June 18, 2014 at 22:52.
250250

251251
### Public API for the vim-session plug-in
252252

autoload/xolox/session.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" Last Change: June 18, 2014
55
" URL: http://peterodding.com/code/vim/session/
66

7-
let g:xolox#session#version = '2.4.11'
7+
let g:xolox#session#version = '2.4.14'
88

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

@@ -398,7 +398,7 @@ function! xolox#session#auto_load() " {{{2
398398
endif
399399
" Check that the user has started Vim without editing any files.
400400
let current_buffer_is_empty = (&modified == 0 && getline(1, '$') == [''])
401-
let buffer_list_is_empty = (bufnr('$') == 1 && bufname('%') == '')
401+
let buffer_list_is_empty = (bufname('%') == '' && empty(filter(range(1, bufnr('$')), 'buflisted(v:val) && v:val != ' . bufnr(''))))
402402
let buffer_list_is_persistent = (index(xolox#misc#option#split(&viminfo), '%') >= 0)
403403
if current_buffer_is_empty && (buffer_list_is_empty || buffer_list_is_persistent)
404404
" Check whether a session matching the user-specified server name exists.

doc/session.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ might take a while...)
490490
Function reference ~
491491

492492
The documentation of the 34 functions below was extracted from 1 Vim scripts on
493-
June 18, 2014 at 22:49.
493+
June 18, 2014 at 22:52.
494494

495495
-------------------------------------------------------------------------------
496496
*public-api-for-vim-session-plug-in*

0 commit comments

Comments
 (0)