@@ -184,7 +184,9 @@ function! xolox#session#save_state(commands) " {{{2
184184 " output. We will fire the event ourselves when we're really done.
185185 call s: eat_trailing_line (lines , ' unlet SessionLoad' )
186186 call s: eat_trailing_line (lines , ' doautoall SessionLoadPost' )
187- call xolox#session#save_special_windows (lines )
187+ if g: session_ignore_special_pages != ' yes'
188+ call xolox#session#save_special_windows (lines )
189+ endif
188190 if ! xolox#session#include_tabs ()
189191 " Customize the output of :mksession for tab scoped sessions.
190192 let buffers = tabpagebuflist ()
@@ -235,6 +237,7 @@ endfunction
235237
236238function ! s: state_filter (line ) " {{{3
237239 " Various changes to the output of :mksession.
240+ " echom "a:line=" . a:line
238241 if a: line = ~ ' ^normal!\? zo$'
239242 " Silence "E490: No fold found" errors.
240243 return ' silent! ' . a: line
@@ -245,6 +248,10 @@ function! s:state_filter(line) " {{{3
245248 elseif a: line = ~ ' ^file .\{-}\[BufExplorer\]$'
246249 " Same trick (about the E95) for BufExplorer.
247250 return ' " ' . a: line
251+ " elseif a:line =~ '^file -MiniBufExplorer-$'
252+ " return '" ' . a:line
253+ elseif a: line = ~ ' ^file .\{-}__Tagbar__$'
254+ return ' " ' . a: line
248255 elseif a: line = ~ ' ^file .\{-}__Tag_List__$'
249256 " Same trick (about the E95) for TagList.
250257 return ' " ' . a: line
@@ -311,9 +318,15 @@ function! s:check_special_window(session)
311318 let command = ' NERDTreeMirror'
312319 let argument = ' '
313320 endif
321+ " elseif bufname == '-MiniBufExplorer-'
322+ " let command = 'MBEOpen'
323+ " let argument = ''
314324 elseif bufname == ' [BufExplorer]'
315325 let command = ' BufExplorer'
316326 let argument = ' '
327+ elseif bufname == ' __Tagbar__'
328+ let command = ' TagbarOpen'
329+ let argument = ' '
317330 elseif bufname == ' __Tag_List__'
318331 let command = ' Tlist'
319332 let argument = ' '
0 commit comments