Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not clobber v:this_session during session save #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inkarkat
Copy link
Contributor

Hello Peter, haven't heard from each other in quite a while. I've been using your plugin(s) happily :-) I hope you're well and you still maintain your plugins, because here's a tiny fix:

When saving a session, the plugin uses :mksession with a temp file, whose name is generated via tempname(). If no session so far existed, Vim will derive a session name (and put this into v:this_session) from that temp file name, e.g. /tmp/v3CCl7f/20 will turn into v:this_session = "20". Now, when another (unnamed) session is saved, the plugin will pick up v:this_session and use "20" instead of "default", which is irritating and unexpected.
Easy fix: Save and restore the value of v:this_session.

When saving a session, the plugin uses :mksession with a temp file, whose name is generated via tempname(). If no session so far existed, Vim will derive a session name (and put this into v:this_session) from that temp file name, e.g. /tmp/v3CCl7f/20 will turn into v:this_session = "20". Now, when another (unnamed) session is saved, the plugin will pick up v:this_session and use "20" instead of "default", which is irritating and unexpected.
Easy fix: Save and restore the value of v:this_session.
@romgrk
Copy link

romgrk commented May 26, 2020

Hey, I'm trying to create a community maintained version of this plugin due to the disparition of the maintainer, if you're interested you can open this PR at https://github.com/romgrk/vim-session.

#185

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