Skip to content

Commit

Permalink
Handle :normal! fold restore in session file.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
inkarkat committed Dec 4, 2012
1 parent ca2e72f commit 597de09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/xolox/session.vim
Expand Up @@ -119,9 +119,9 @@ function! xolox#session#save_state(commands) " {{{2
endfunction

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

0 comments on commit 597de09

Please sign in to comment.