1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

fix(neoyank): fix telescope neoyank extension

This commit is contained in:
wsdjeg 2022-10-27 20:03:26 +08:00
parent 265e276634
commit 56a1ab4796

View File

@ -50,10 +50,10 @@ local function show_yank_history(opts)
actions.select_default:replace(function() actions.select_default:replace(function()
local entry = action_state.get_selected_entry() local entry = action_state.get_selected_entry()
actions.close(prompt_bufnr) actions.close(prompt_bufnr)
local reg = vim.fn.getreg('*') local reg = vim.fn.getreg('"')
vim.fn.setreg('*', entry.value[2]) vim.fn.setreg('"', entry.value[1])
vim.cmd("put *") vim.cmd("normal! p")
vim.fn.setreg('*', reg) vim.fn.setreg('"', reg)
end) end)
return true return true
end, end,