Skip to content

Conversation

cameronr
Copy link
Collaborator

@cameronr cameronr commented Oct 10, 2024

Should only impact manually named sessions, making them work more
how I think people would expect them to work.

If you're using a manually named session (either through ':SessionSave
mysession', :SessionSearch, or :SessionRestore mysession) then we'll
now auto-save to that session on exit instead of always autosaving to
the session derived from the cwd.

Fixes #389

If you're using a manually named session (either through ':SessionSave
mysession', `:SessionSearch`, or `:SessionRestore mysession`) then we'll
now auto-save to that session on exit instead of always autosaving to
the session derived from the cwd.
When auto-saving, if the session has been manually named use that
session name instead of the cwd session name. Fixes manually named
session not auto-saving on exit.
Turn off auto_create to make sure correct session name is checked when
deciding to allow session saving or not
@cameronr
Copy link
Collaborator Author

As a bonus, this also fixes #389 because it recognizes that the currently loaded session is manually named (i.e. it wasn't loaded from the cwd, including the currently checkout git branch)

@cameronr cameronr merged commit 3cd531c into rmagatti:main Oct 18, 2024
7 checks passed
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.

[BUG] Auto save overrides wrong git-based-session file after switching sessions

2 participants