From ddbc8f3b86acadb67f41e2f4579063d8187f5fed Mon Sep 17 00:00:00 2001 From: Cameron Ring Date: Wed, 11 Sep 2024 20:35:53 -0700 Subject: [PATCH] fix: return nil in session lens entry maker Telescope merged my fix for: https://github.com/nvim-telescope/telescope.nvim/issues/3265 So now we can return nil to have a correct count and still have delete sessions from the Telescope picker work --- lua/auto-session/session-lens/init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/auto-session/session-lens/init.lua b/lua/auto-session/session-lens/init.lua index a727a82..3e69ace 100644 --- a/lua/auto-session/session-lens/init.lua +++ b/lua/auto-session/session-lens/init.lua @@ -20,11 +20,7 @@ function SessionLens.make_telescope_callback(opts) -- Don't include x.vim files that nvim makes for custom user -- commands if not Lib.is_session_file(session_root_dir .. file_name) then - -- FIXME: Returning nil would be better here since otherwise the result count - -- will be off. However, returning nil can prevent delete from working so return {} - -- until this is fixed: - -- https://github.com/nvim-telescope/telescope.nvim/issues/3265 - return {} + return nil end -- the name of the session, to be used for restoring/deleting