Shatur / neovim-session-manager

A simple wrapper around :mksession.
GNU General Public License v3.0
530 stars 52 forks source link

Clear the active session on `delete_current_dir_session` #140

Closed doongjohn closed 3 months ago

doongjohn commented 3 months ago

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 commented 3 months ago

But we already doing it here: https://github.com/Shatur/neovim-session-manager/blob/35c154a4b904cbe2aa7acce00a8c1c54a8831780/lua/session_manager/utils.lua#L102-L104

doongjohn commented 3 months ago

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

Shatur commented 3 months ago

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

doongjohn commented 3 months ago

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

doongjohn commented 3 months ago

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

Shatur commented 3 months ago

Ah, yes, looks like a bug!