Navigation Menu

Skip to content

Commit

Permalink
Merge bug fix for auto-loading of tab scoped sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed May 23, 2013
2 parents c73b541 + 473ca59 commit 359575c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions autoload/xolox/session.vim
@@ -1,9 +1,9 @@
" Vim script
" Author: Peter Odding
" Last Change: May 21, 2013
" Last Change: May 24, 2013
" URL: http://peterodding.com/code/vim/session/

let g:xolox#session#version = '2.3.3'
let g:xolox#session#version = '2.3.4'

" Public API for session persistence. {{{1

Expand Down Expand Up @@ -442,16 +442,17 @@ function! xolox#session#open_cmd(name, bang, command) abort " {{{2
elseif a:bang == '!' || !s:session_is_locked(path, a:command)
let oldcwd = s:nerdtree_persist()
call xolox#session#close_cmd(a:bang, 1, name != s:get_name('', 0), a:command)
if xolox#session#include_tabs()
let g:session_old_cwd = oldcwd
else
let t:session_old_cwd = oldcwd
endif
call s:lock_session(path)
execute 'source' fnameescape(path)
if xolox#session#is_tab_scoped()
let t:session_old_cwd = oldcwd
let session_type = 'tab scoped'
else
let g:session_old_cwd = oldcwd
let session_type = 'global'
endif
call s:last_session_persist(name)
call s:flush_session()
let session_type = xolox#session#include_tabs() ? 'global' : 'tab scoped'
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, ':~'))
endif
Expand Down
4 changes: 2 additions & 2 deletions doc/session.txt
Expand Up @@ -457,8 +457,8 @@ If you like the script please vote for it on Vim Online [12].
*session-license*
License ~

This software is licensed under the MIT license [13]. Š 2013 Peter Odding
<peter@peterodding.com>.
This software is licensed under the MIT license [13]. Copyright 2013 Peter
Odding <peter@peterodding.com>.

===============================================================================
*sample-session-script*
Expand Down

0 comments on commit 359575c

Please sign in to comment.