Skip to content

Commit

Permalink
fix: return nil in session lens entry maker
Browse files Browse the repository at this point in the history
Telescope merged my fix for:
nvim-telescope/telescope.nvim#3265

So now we can return nil to have a correct count and still have delete
sessions from the Telescope picker work
  • Loading branch information
cameronr committed Sep 12, 2024
1 parent a90aa77 commit ddbc8f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lua/auto-session/session-lens/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ function SessionLens.make_telescope_callback(opts)
-- Don't include <session>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
Expand Down

0 comments on commit ddbc8f3

Please sign in to comment.