From 7cdaaaa39dde06b7372aa1b326c272ad11a95d4e Mon Sep 17 00:00:00 2001 From: toppair <51824331+toppair@users.noreply.github.com> Date: Sat, 10 Jul 2021 17:46:08 +0200 Subject: fix: pasting multiline register content (#971) --- lua/telescope/actions/init.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lua') diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 8ca96c7..929622d 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -353,12 +353,7 @@ actions.paste_register = function(prompt_bufnr) -- ensure that the buffer can be written to if vim.api.nvim_buf_get_option(vim.api.nvim_get_current_buf(), "modifiable") then print("Paste!") - -- substitute "^V" for "b" - local reg_type = vim.fn.getregtype(entry.value) - if reg_type:byte(1, 1) == 0x16 then - reg_type = "b" .. reg_type:sub(2, -1) - end - vim.api.nvim_put({entry.content}, reg_type, true, true) + vim.api.nvim_paste(entry.content, true, -1) end end -- cgit v1.2.3