Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I had to [Enter] to conitunue from autoload #197

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions autoload/xolox/session.vim
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ function! xolox#session#save_state(commands) " {{{2
" output. We will fire the event ourselves when we're really done.
call s:eat_trailing_line(lines, 'unlet SessionLoad')
call s:eat_trailing_line(lines, 'doautoall SessionLoadPost')
call xolox#session#save_special_windows(lines)
if exists("g:session_ignore_special_pages")
call xolox#session#save_special_windows(lines)
endif
if !xolox#session#include_tabs()
" Customize the output of :mksession for tab scoped sessions.
let buffers = tabpagebuflist()
Expand Down Expand Up @@ -235,6 +237,7 @@ endfunction

function! s:state_filter(line) " {{{3
" Various changes to the output of :mksession.
" echom "a:line=" . a:line
if a:line =~ '^normal!\? zo$'
" Silence "E490: No fold found" errors.
return 'silent! ' . a:line
Expand All @@ -245,6 +248,10 @@ function! s:state_filter(line) " {{{3
elseif a:line =~ '^file .\{-}\[BufExplorer\]$'
" Same trick (about the E95) for BufExplorer.
return '" ' . a:line
" elseif a:line =~ '^file -MiniBufExplorer-$'
" return '" ' . a:line
elseif a:line =~ '^file .\{-}__Tagbar__$'
return '" ' . a:line
elseif a:line =~ '^file .\{-}__Tag_List__$'
" Same trick (about the E95) for TagList.
return '" ' . a:line
Expand Down Expand Up @@ -311,9 +318,15 @@ function! s:check_special_window(session)
let command = 'NERDTreeMirror'
let argument = ''
endif
" elseif bufname == '-MiniBufExplorer-'
" let command = 'MBEOpen'
" let argument = ''
elseif bufname == '[BufExplorer]'
let command = 'BufExplorer'
let argument = ''
elseif bufname == '__Tagbar__'
let command = 'TagbarOpen'
let argument = ''
elseif bufname == '__Tag_List__'
let command = 'Tlist'
let argument = ''
Expand Down Expand Up @@ -590,7 +603,10 @@ function! xolox#session#open_cmd(name, bang, command) abort " {{{2
call s:last_session_persist(name)
call s:flush_session()
call xolox#misc#timer#stop("session.vim %s: Opened %s %s session in %s.", g:xolox#session#version, session_type, string(name), starttime)
call xolox#misc#msg#info("session.vim %s: Opened %s %s session from %s.", g:xolox#session#version, session_type, string(name), fnamemodify(path, ':~'))
if g:session_verbose_messages
" this may force user to press [Enter]
call xolox#misc#msg#info("session.vim %s: Opened %s %s session from %s.", g:xolox#session#version, session_type, string(name), fnamemodify(path, ':~'))
endif
endif
endif
return 1
Expand Down