Skip to content

Commit 597de09

Browse files
committed
Handle :normal! fold restore in session file.
A recent Vim 7.3 patch fixed the use of :normal to :normal! zo (so that mappings do not apply). Adapt the plugin's parsing to accommodate this.
1 parent ca2e72f commit 597de09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/xolox/session.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ function! xolox#session#save_state(commands) " {{{2
119119
endfunction
120120

121121
function! s:state_filter(line)
122-
if a:line == 'normal zo'
122+
if a:line =~ '^normal!\? zo$'
123123
" Silence "E490: No fold found" errors.
124-
return 'silent! normal zo'
124+
return 'silent! ' . a:line
125125
elseif a:line =~ '^file .\{-}\<NERD_tree_\d\+$'
126126
" Silence "E95: Buffer with this name already exists" when restoring
127127
" mirrored NERDTree windows.

0 commit comments

Comments
 (0)