feat: mark active session in telescope, use `vim.fn.confirm`

main
Dhruv Manilawala 2023-06-12 13:06:05 +05:30 committed by GitHub
parent f5d84ea6e1
commit 0cdbc8a3fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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