Skip to content

Commit

Permalink
Improve support for special windows, specifically NERDTree
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Sep 18, 2011
1 parent fe58d29 commit 5a4db7c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions autoload/xolox/session.vim
Expand Up @@ -3,7 +3,7 @@
" Last Change: September 18, 2011
" URL: http://peterodding.com/code/vim/session/

let g:xolox#session#version = '1.4.14'
let g:xolox#session#version = '1.4.15'

" Public API for session persistence. {{{1

Expand Down Expand Up @@ -116,7 +116,7 @@ function! s:state_filter(line)
elseif a:line =~ '^file .\{-}[\\/]NERD_tree_\d$'
" Silence "E95: Buffer with this name already exists" when restoring
" mirrored NERDTree windows.
return 'silent! ' . a:line
return '" ' . a:line
else
return a:line
endif
Expand Down Expand Up @@ -171,9 +171,7 @@ function! s:check_special_window(session)
endif
if exists('command')
call s:jump_to_window(a:session, tabpagenr(), winnr())
if command != 'edit'
call add(a:session, 'bwipeout')
endif
call add(a:session, 'let s:bufnr = bufnr("%")')
if argument == ''
call add(a:session, command)
else
Expand All @@ -183,6 +181,7 @@ function! s:check_special_window(session)
endif
call add(a:session, command . ' ' . fnameescape(argument))
endif
call add(a:session, 'execute "bwipeout" s:bufnr')
return 1
endif
endfunction
Expand Down

0 comments on commit 5a4db7c

Please sign in to comment.