mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix: move vim.fn.nvim_feedkeys to vim.api.nvim_feedkeys (#15)
This commit is contained in:
parent
8b584bd88f
commit
926fbde059
@ -207,7 +207,7 @@ local frecency = function(opts)
|
|||||||
local compinfo = vim.fn.complete_info()
|
local compinfo = vim.fn.complete_info()
|
||||||
local keys = compinfo.selected == -1 and "<C-e><Bs><Right>" or "<C-y><Right>:"
|
local keys = compinfo.selected == -1 and "<C-e><Bs><Right>" or "<C-y><Right>:"
|
||||||
local accept_completion = vim.api.nvim_replace_termcodes(keys, true, false, true)
|
local accept_completion = vim.api.nvim_replace_termcodes(keys, true, false, true)
|
||||||
vim.fn.nvim_feedkeys(accept_completion, "n", true)
|
vim.api.nvim_feedkeys(accept_completion, "n", true)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
@ -223,7 +223,7 @@ local frecency = function(opts)
|
|||||||
|
|
||||||
-- restore last filter
|
-- restore last filter
|
||||||
if state.persistent_filter and state.last_filter then
|
if state.persistent_filter and state.last_filter then
|
||||||
vim.fn.nvim_feedkeys(":" .. state.last_filter .. ":", "n", true)
|
vim.api.nvim_feedkeys(":" .. state.last_filter .. ":", "n", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_buf_set_option(state.picker.prompt_bufnr, "filetype", "frecency")
|
vim.api.nvim_buf_set_option(state.picker.prompt_bufnr, "filetype", "frecency")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user