aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_editor.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-06 12:43:05 +0800
committerGitHub <noreply@github.com>2022-11-06 12:43:05 +0800
commit850d7146fc7fb57691641c729d5580b834cd7dd2 (patch)
tree0ef520e3ec0f5d060c42deeca52ffc4d56b31633 /runtime/lua/vim/_editor.lua
parenteb55eba7e5b422301c50088623e60514a843ab08 (diff)
downloadrneovim-850d7146fc7fb57691641c729d5580b834cd7dd2.tar.gz
rneovim-850d7146fc7fb57691641c729d5580b834cd7dd2.tar.bz2
rneovim-850d7146fc7fb57691641c729d5580b834cd7dd2.zip
fix(paste): feed keys as typed in cmdline mode (#20959)
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
-rw-r--r--runtime/lua/vim/_editor.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index 0f312f19f5..0013f38d89 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -167,7 +167,8 @@ do
local line1 = lines[1]:gsub('(%c)', '\022%1')
-- nvim_input() is affected by mappings,
-- so use nvim_feedkeys() with "n" flag to ignore mappings.
- vim.api.nvim_feedkeys(line1, 'n', true)
+ -- "t" flag is also needed so the pasted text is saved in cmdline history.
+ vim.api.nvim_feedkeys(line1, 'nt', true)
end
return true
end