mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix: new action interface (#12)
This commit is contained in:
parent
ffa2027102
commit
8b584bd88f
@ -200,15 +200,14 @@ local frecency = function(opts)
|
|||||||
return {prompt = query_text, updated_finder = new_finder}
|
return {prompt = query_text, updated_finder = new_finder}
|
||||||
end,
|
end,
|
||||||
attach_mappings = function(prompt_bufnr)
|
attach_mappings = function(prompt_bufnr)
|
||||||
actions.goto_file_selection_edit:replace(function()
|
actions.select_default:replace_if(function()
|
||||||
local compinfo = vim.fn.complete_info()
|
local compinfo = vim.fn.complete_info()
|
||||||
if compinfo.pum_visible == 1 then
|
return compinfo.pum_visible == 1
|
||||||
local keys = compinfo.selected == -1 and "<C-e><Bs><Right>" or "<C-y><Right>:"
|
end, function()
|
||||||
local accept_completion = vim.api.nvim_replace_termcodes(keys, true, false, true)
|
local compinfo = vim.fn.complete_info()
|
||||||
vim.fn.nvim_feedkeys(accept_completion, "n", true)
|
local keys = compinfo.selected == -1 and "<C-e><Bs><Right>" or "<C-y><Right>:"
|
||||||
else
|
local accept_completion = vim.api.nvim_replace_termcodes(keys, true, false, true)
|
||||||
actions._goto_file_selection(prompt_bufnr, "edit")
|
vim.fn.nvim_feedkeys(accept_completion, "n", true)
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user