Closed Subjective closed 1 year ago
This is somewhat unrelated, but is there any way to determine a tab's handle given its number? Ideally, there would be some way to clear a tab-scoped session when its corresponding tab is closed, maybe something along the lines of:
vim.api.nvim_create_autocmd("TabClosed", {
group = vim.api.nvim_create_augroup("ResessionClearTabSession", { clear = true }),
callback = function(args)
local tab = tab_num_to_handle(args.file)
tab_sessions[tab] = nil
-- M.detach(_, _, tab)
end,
})
I have a specific use case for having User events emitted that can't be solved via hooks. I think it would be great if this option was provided, similar how native sessions emit
SessionLoadPost