Skip to content

Conversation

@inkarkat
Copy link
Contributor

When a tab-scoped session is automatically opened during load (or via the :OpenSession command), the session lock does not contain the 'tabpage' attribute. This causes the auto-save when quitting Vim to fail with "The 'default' session is already loaded in this Vim. Use the command ':SaveTabSession! default' to override."

During auto-load (because we cannot know whether the to-be-loaded session is a session-scoped one), we need to update the lock in case of a tab-scoped session after opening the session.
Additionally, the s:vim_instance_id() function also needs to consider xolox#session#is_tab_scoped(), as only that is set during (auto-)load; xolox#session#include_tabs() only gives the correct result when one of the :...TabSession commands is invoked.

When a tab-scoped session is automatically opened during load (or via the :OpenSession command), the session lock does not contain the 'tabpage' attribute. This causes the auto-save when quitting Vim to fail with "The 'default' session is already loaded in this Vim. Use the command ':SaveTabSession! default' to override."

During auto-load (because we cannot know whether the to-be-loaded session is a session-scoped one), we need to update the lock in case of a tab-scoped session _after_ opening the session.
Additionally, the s:vim_instance_id() function also needs to consider xolox#session#is_tab_scoped(), as only that is set during (auto-)load; xolox#session#include_tabs() only gives the correct result when one of the :...TabSession commands is invoked.
@xolox xolox merged commit 8254cff into xolox:master Jul 30, 2014
xolox added a commit that referenced this pull request Jul 30, 2014
@xolox
Copy link
Owner

xolox commented Jul 30, 2014

Hey Ingo, thanks for the pull request. Your explanation makes sense and the changes seem fine so this is now merged!

@inkarkat inkarkat deleted the fix-tabsession-load branch July 30, 2014 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants