Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #94: Handle (i.e. do not increase) zero-width windows
  • Loading branch information
xolox committed Jun 18, 2014
2 parents 70cbfa9 + c8f8417 commit 5338653
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -246,7 +246,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac
<!-- Start of generated documentation -->

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

Expand Down
10 changes: 8 additions & 2 deletions 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'
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion doc/session.txt
Expand Up @@ -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*
Expand Down

0 comments on commit 5338653

Please sign in to comment.