File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
" Vim script
2
2
" Author: Peter Odding
3
- " Last Change: June 4 , 2011
3
+ " Last Change: June 11 , 2011
4
4
" URL: http://peterodding.com/code/vim/session/
5
5
6
6
let s: script = expand (' <sfile>:p:~' )
@@ -101,14 +101,23 @@ function! xolox#session#save_state(commands) " {{{2
101
101
call remove (lines , -1 )
102
102
endif
103
103
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) ' ) )
105
105
return 1
106
106
finally
107
107
let &sessionoptions = ssop_save
108
108
call delete (tempfile)
109
109
endtry
110
110
endfunction
111
111
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
+
112
121
function ! xolox#session#save_special_windows (session) " {{{2
113
122
" Integration between :mksession, :NERDTree and :Project.
114
123
let tabpage = tabpagenr ()
Original file line number Diff line number Diff line change 1
1
" Vim script
2
2
" Author: Peter Odding
3
- " Last Change: June 4 , 2011
3
+ " Last Change: June 11 , 2011
4
4
" URL: http://peterodding.com/code/vim/session/
5
- " Version: 1.4.6
5
+ " Version: 1.4.7
6
6
7
7
" Support for automatic update using the GLVS plug-in.
8
8
" GetLatestVimScripts: 3150 1 :AutoInstall: session.zip
You can’t perform that action at this time.
0 commit comments