summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoppair <51824331+toppair@users.noreply.github.com>2021-07-10 17:46:08 +0200
committerGitHub <noreply@github.com>2021-07-10 17:46:08 +0200
commit7cdaaaa39dde06b7372aa1b326c272ad11a95d4e (patch)
treec61865884566ba8988fd410fbbc81aab51345893
parent777ff91ddc7204c4169ec070add252d8314868f5 (diff)
fix: pasting multiline register content (#971)
-rw-r--r--doc/telescope.txt2
-rw-r--r--lua/telescope/actions/init.lua7
2 files changed, 2 insertions, 7 deletions
diff --git a/doc/telescope.txt b/doc/telescope.txt
index a264ec5..832e4a5 100644
--- a/doc/telescope.txt
+++ b/doc/telescope.txt
@@ -51,7 +51,7 @@ telescope.setup({opts}) *telescope.setup()*
history: ~
This field handles the configuration for prompt history.
By default it is a table, with default values (more below).
- To disable history, set it to either false or nil.
+ To disable history, set it to false.
Currently mappings still need to be added, Example:
mappings = {
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