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

Clear the active session on delete_current_dir_session #140

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

doongjohn
Copy link
Contributor

This will make autosave_only_in_session=true not save a previously deleted session on exit when it's deleted via delete_current_dir_session.

@Shatur
Copy link
Owner

Shatur commented Aug 2, 2024

But we already doing it here:

if filename == utils.active_session_filename then
utils.active_session_filename = nil
end

@doongjohn
Copy link
Contributor Author

This is strange... because without my modification the session is still saved on exit.

@Shatur
Copy link
Owner

Shatur commented Aug 2, 2024

Shouldn't be the case, we call utils.delete_session(session).

@doongjohn
Copy link
Contributor Author

I guess utils.delete_session expects string so
filename == utils.active_session_filename
this is comparing session filename object and string?

@doongjohn
Copy link
Contributor Author

I've updated the code. It's working for me.

@Shatur
Copy link
Owner

Shatur commented Aug 2, 2024

Ah, yes, looks like a bug!

@Shatur Shatur merged commit cbaebd9 into Shatur:master Aug 2, 2024
2 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.

2 participants