Skip to content

Commit 363c40d

Browse files
committed
Separate persistence of &background vs. :colorscheme
1 parent 5a4db7c commit 363c40d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autoload/xolox/session.vim

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

6-
let g:xolox#session#version = '1.4.15'
6+
let g:xolox#session#version = '1.4.16'
77

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

@@ -43,9 +43,11 @@ function! xolox#session#save_features(commands) " {{{2
4343
endfunction
4444

4545
function! xolox#session#save_colors(commands) " {{{2
46+
call add(a:commands, 'if &background != ' . string(&background))
47+
call add(a:commands, "\tset background=" . &background)
48+
call add(a:commands, 'endif')
4649
if exists('g:colors_name') && type(g:colors_name) == type('') && g:colors_name != ''
4750
let template = "if !exists('g:colors_name') || g:colors_name != %s | colorscheme %s | endif"
48-
call add(a:commands, 'set background=' . &background)
4951
call add(a:commands, printf(template, string(g:colors_name), fnameescape(g:colors_name)))
5052
endif
5153
endfunction

0 commit comments

Comments
 (0)