Skip to content

Commit

Permalink
Clear the active session on delete_current_dir_session
Browse files Browse the repository at this point in the history
  • Loading branch information
doongjohn committed Aug 2, 2024
1 parent 35c154a commit 3b9d4c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/session_manager/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ function session_manager.delete_current_dir_session()
local session = config.dir_to_session_filename(cwd)
if session:exists() then
utils.delete_session(session)

-- Clear the active session filename if deleted.
if session.filename == utils.active_session_filename then
utils.active_session_filename = nil
end
end
end
end
Expand Down

0 comments on commit 3b9d4c6

Please sign in to comment.