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 session = get_selected_session()
|
||||||
local path = session.file_path
|
local path = session.file_path
|
||||||
|
|
||||||
local confirm = vim.fn.input("Delete [" .. session.name .. "]?: ", ""):lower()
|
if vim.fn.confirm("Delete [" .. session.name .. "]?", "&Yes\n&No") == 1 then
|
||||||
if confirm == "yes" or confirm == "y" then
|
|
||||||
vim.fn.delete(vim.fn.expand(path))
|
vim.fn.delete(vim.fn.expand(path))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ M.session_finder = function(sessions)
|
||||||
else
|
else
|
||||||
str = session.dir_path
|
str = session.dir_path
|
||||||
end
|
end
|
||||||
|
if session.file_path == vim.v.this_session then
|
||||||
|
str = str .. " (*)"
|
||||||
|
end
|
||||||
return displayer({ str })
|
return displayer({ str })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue