File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11" Vim script
22" Author: Peter Odding
3- " Last Change: June 4 , 2011
3+ " Last Change: June 11 , 2011
44" URL: http://peterodding.com/code/vim/session/
55
66let s: script = expand (' <sfile>:p:~' )
@@ -101,14 +101,23 @@ function! xolox#session#save_state(commands) " {{{2
101101 call remove (lines , -1 )
102102 endif
103103 call xolox#session#save_special_windows (lines )
104- call extend (a: commands , lines )
104+ call extend (a: commands , map ( lines , ' s:state_filter(v:val) ' ) )
105105 return 1
106106 finally
107107 let &sessionoptions = ssop_save
108108 call delete (tempfile)
109109 endtry
110110endfunction
111111
112+ function ! s: state_filter (line )
113+ if a: line == ' normal zo'
114+ " Silence "E490: No fold found" errors.
115+ return ' silent! normal zo'
116+ else
117+ return a: line
118+ endif
119+ endfunction
120+
112121function ! xolox#session#save_special_windows (session) " {{{2
113122 " Integration between :mksession, :NERDTree and :Project.
114123 let tabpage = tabpagenr ()
Original file line number Diff line number Diff line change 11" Vim script
22" Author: Peter Odding
3- " Last Change: June 4 , 2011
3+ " Last Change: June 11 , 2011
44" URL: http://peterodding.com/code/vim/session/
5- " Version: 1.4.6
5+ " Version: 1.4.7
66
77" Support for automatic update using the GLVS plug-in.
88" GetLatestVimScripts: 3150 1 :AutoInstall: session.zip
You can’t perform that action at this time.
0 commit comments