Skip to content

Commit db4f9e7

Browse files
committed
Merge pull request #99: Write correct session lock when (auto-)opening tab-scoped session
2 parents c247d0b + 8254cff commit db4f9e7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac
256256
<!-- Start of generated documentation -->
257257

258258
The documentation of the 37 functions below was extracted from
259-
2 Vim scripts on July 30, 2014 at 21:49.
259+
2 Vim scripts on July 30, 2014 at 21:54.
260260

261261
### Public API for the vim-session plug-in
262262

autoload/xolox/session.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" Last Change: July 30, 2014
55
" URL: http://peterodding.com/code/vim/session/
66

7-
let g:xolox#session#version = '2.6.2'
7+
let g:xolox#session#version = '2.6.3'
88

99
" Public API for session persistence. {{{1
1010

@@ -560,6 +560,7 @@ function! xolox#session#open_cmd(name, bang, command) abort " {{{2
560560
call s:lock_session(path)
561561
execute 'source' fnameescape(path)
562562
if xolox#session#is_tab_scoped()
563+
call s:lock_session(path) " Retroactively (this is only known after the session has been loaded) add the tabpage to the lock.
563564
let t:session_old_cwd = oldcwd
564565
let session_type = 'tab scoped'
565566
else
@@ -1022,7 +1023,7 @@ function! s:vim_instance_id()
10221023
if !empty(v:servername)
10231024
let id['servername'] = v:servername
10241025
endif
1025-
if !xolox#session#include_tabs()
1026+
if !xolox#session#include_tabs() || xolox#session#is_tab_scoped()
10261027
let id['tabpage'] = tabpagenr()
10271028
endif
10281029
return id

doc/session.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ might take a while...)
513513
Function reference ~
514514

515515
The documentation of the 37 functions below was extracted from 2 Vim scripts on
516-
July 30, 2014 at 21:49.
516+
July 30, 2014 at 21:54.
517517

518518
-------------------------------------------------------------------------------
519519
*public-api-for-vim-session-plug-in*

0 commit comments

Comments
 (0)