Restore previous v:this_session value after writing tmp session file#78
Merged
tpope merged 3 commits intotpope:masterfrom Dec 2, 2022
Merged
Restore previous v:this_session value after writing tmp session file#78tpope merged 3 commits intotpope:masterfrom
tpope merged 3 commits intotpope:masterfrom
Conversation
Owner
|
The value is already in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a problem with leftover tmp session files. Issue happens after changing/adding buffers/tabs and toggling Obsession (to pause/unpause session tracking). The folder looks like this after a couple of runs (see below, played only with Neovim 0.8). Issue is caused by the mksession call automatically changing the v:this_session variable after writing the tmp session file. Solution is to restore the v:this_session variable after the mksession call.
$ ll Session.vim*
Session.vim.1661.obsession~
Session.vim.1767.obsession~
Session.vim.23502.obsession~
Session.vim.24782.obsession~
Session.vim.24782.obsession~.24782.obsession~.24782.obsession~
Session.vim.24782.obsession~.24782.obsession~.24782.obsession~.24782.obsession~
Session.vim.28396.obsession~
Session.vim.29727.obsession~
Session.vim.31061.obsession~
Session.vim.3134.obsession~
Session.vim.3134.obsession~.3134.obsession~
Session.vim.32691.obsession~
Session.vim.378.obsession~
Session.vim.4539.obsession~