diff --git a/lua/telescope/_extensions/persisted/actions.lua b/lua/telescope/_extensions/persisted/actions.lua index 671f6a5..a58fb90 100644 --- a/lua/telescope/_extensions/persisted/actions.lua +++ b/lua/telescope/_extensions/persisted/actions.lua @@ -30,8 +30,7 @@ M.delete_session = function() local session = get_selected_session() local path = session.file_path - local confirm = vim.fn.input("Delete [" .. session.name .. "]?: ", ""):lower() - if confirm == "yes" or confirm == "y" then + if vim.fn.confirm("Delete [" .. session.name .. "]?", "&Yes\n&No") == 1 then vim.fn.delete(vim.fn.expand(path)) end end diff --git a/lua/telescope/_extensions/persisted/finders.lua b/lua/telescope/_extensions/persisted/finders.lua index 4850892..c013dae 100644 --- a/lua/telescope/_extensions/persisted/finders.lua +++ b/lua/telescope/_extensions/persisted/finders.lua @@ -20,6 +20,9 @@ M.session_finder = function(sessions) else str = session.dir_path end + if session.file_path == vim.v.this_session then + str = str .. " (*)" + end return displayer({ str }) end