Skip to content

Commit aadb3a2

Browse files
committed
Bug fix: Disable Vim's special handling of initial, empty buffer
See issue #28 on GitHub: #28
1 parent bbd1f8f commit aadb3a2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

addon-info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"vim_script_nr": 3150, "dependencies": {"vim-misc": {}}, "homepage": "http://peterodding.com/code/vim/session", "name": "vim-session"}

autoload/xolox/session.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Last Change: June 22, 2013
44
" URL: http://peterodding.com/code/vim/session/
55

6-
let g:xolox#session#version = '2.4'
6+
let g:xolox#session#version = '2.4.1'
77

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

@@ -204,6 +204,12 @@ function! s:state_filter(line) " {{{3
204204
" when :mksession adds corresponding :argglobal and/or :argument commands
205205
" to the session script.
206206
return '" ' . a:line
207+
elseif a:line =~ "^\\s*silent exe 'bwipe ' \\. s:wipebuf$"
208+
" Disable Vim's special handling of the initial, empty buffer because it
209+
" breaks restoring of special windows with content generated by a Vim
210+
" plug-in. The :mksession command doesn't have this problem because it
211+
" simply doesn't support buffers with generated contents...
212+
return '" ' . a:line
207213
else
208214
return a:line
209215
endif

0 commit comments

Comments
 (0)