feat: mark active session in telescope, use `vim.fn.confirm`
parent
f5d84ea6e1
commit
0cdbc8a3fe
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue