Skip to content

Commit

Permalink
fix: wipeout buffers instead of just deleting them
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronr committed Jul 22, 2024
1 parent 8336407 commit 5e1c1e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/auto-session/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -916,10 +916,12 @@ function AutoSession.RestoreSessionFromDir(session_dir, session_name, show_messa

-- Set restore_in_progress here so we won't also try to save/load the session if
-- cwd_change_handling = true and the session contains a cd command
-- The session file will also set SessionLoad so we'll check that too but feels
-- safer to have our own flag as well, in case the vim flag changes
AutoSession.restore_in_progress = true

-- Clear the buffers and jumps just in case
vim.cmd "%bd!"
-- Clear the buffers and jumps
vim.cmd "%bw!"
vim.cmd "clearjumps"

---@diagnostic disable-next-line: param-type-mismatch
Expand Down

0 comments on commit 5e1c1e8

Please sign in to comment.