Skip to content

Commit

Permalink
fix: #391 err loading session w/ terminal from Fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronr committed Nov 11, 2024
1 parent 8396da9 commit 498ddfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/auto-session/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ local function handle_autosession_command(data)
local files = Lib.get_session_list(M.AutoSession.get_root_dir())
if data.args:match "search" then
open_picker(files, "Select a session:", function(choice)
M.AutoSession.autosave_and_restore(choice.session_name)
-- Defer session loading function to fix issue with Fzf and terminal sessions:
-- https://github.com/rmagatti/auto-session/issues/391
vim.defer_fn(function()
M.AutoSession.autosave_and_restore(choice.session_name)
end, 50)
end)
elseif data.args:match "delete" then
open_picker(files, "Delete a session:", function(choice)
Expand Down

0 comments on commit 498ddfb

Please sign in to comment.