Skip to content
Snippets Groups Projects
Commit 13d405d4 authored by Peter Odding's avatar Peter Odding
Browse files

Ignore "No fold found" errors

parent d9af5b1c
No related branches found
Tags 1.4.7
No related merge requests found
" Vim script
" Author: Peter Odding
" Last Change: June 4, 2011
" Last Change: June 11, 2011
" URL: http://peterodding.com/code/vim/session/
let s:script = expand('<sfile>:p:~')
......@@ -101,7 +101,7 @@ function! xolox#session#save_state(commands) " {{{2
call remove(lines, -1)
endif
call xolox#session#save_special_windows(lines)
call extend(a:commands, lines)
call extend(a:commands, map(lines, 's:state_filter(v:val)'))
return 1
finally
let &sessionoptions = ssop_save
......@@ -109,6 +109,15 @@ function! xolox#session#save_state(commands) " {{{2
endtry
endfunction
function! s:state_filter(line)
if a:line == 'normal zo'
" Silence "E490: No fold found" errors.
return 'silent! normal zo'
else
return a:line
endif
endfunction
function! xolox#session#save_special_windows(session) " {{{2
" Integration between :mksession, :NERDTree and :Project.
let tabpage = tabpagenr()
......
" Vim script
" Author: Peter Odding
" Last Change: June 4, 2011
" Last Change: June 11, 2011
" URL: http://peterodding.com/code/vim/session/
" Version: 1.4.6
" Version: 1.4.7
" Support for automatic update using the GLVS plug-in.
" GetLatestVimScripts: 3150 1 :AutoInstall: session.zip
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment