diff --git a/README.md b/README.md index 0948a43..4254406 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac The documentation of the 34 functions below was extracted from -1 Vim scripts on June 18, 2014 at 22:45. +1 Vim scripts on June 18, 2014 at 22:49. ### Public API for the vim-session plug-in diff --git a/autoload/xolox/session.vim b/autoload/xolox/session.vim index 2971522..99bdcf6 100644 --- a/autoload/xolox/session.vim +++ b/autoload/xolox/session.vim @@ -1,7 +1,7 @@ " Public API for the vim-session plug-in. " " Author: Peter Odding -" Last Change: June 17, 2014 +" Last Change: June 18, 2014 " URL: http://peterodding.com/code/vim/session/ let g:xolox#session#version = '2.4.11' @@ -55,8 +55,10 @@ function! xolox#session#save_session(commands, filename) " {{{2 if is_all_tabs call add(a:commands, 'doautoall SessionLoadPost') else + call add(a:commands, 'let s:winrestcmd = winrestcmd()') call add(a:commands, 'windo doautocmd SessionLoadPost') call s:jump_to_window(a:commands, tabpagenr(), winnr()) + call add(a:commands, 'silent! execute s:winrestcmd') endif call add(a:commands, 'unlet SessionLoad') call add(a:commands, '" vim: ft=vim ro nowrap smc=128') @@ -294,9 +296,13 @@ endfunction function! s:check_special_tabpage(session) let status = 0 + let winrestcmd = winrestcmd() + let window = winnr() windo let status += s:check_special_window(a:session) + execute window . 'wincmd w' + silent! execute winrestcmd if status > 0 && winnr('$') > 1 - call add(a:session, winrestcmd()) + call add(a:session, winrestcmd) endif endfunction diff --git a/doc/session.txt b/doc/session.txt index 92503be..1ffdcd6 100644 --- a/doc/session.txt +++ b/doc/session.txt @@ -490,7 +490,7 @@ might take a while...) Function reference ~ The documentation of the 34 functions below was extracted from 1 Vim scripts on -June 18, 2014 at 22:45. +June 18, 2014 at 22:49. ------------------------------------------------------------------------------- *public-api-for-vim-session-plug-in*