mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
paste: fix handling of "<" in cmdline (#11094)
Fixes https://github.com/neovim/neovim/issues/11088.
This commit is contained in:
@@ -189,7 +189,7 @@ paste = (function()
|
||||
if mode == 'c' and not got_line1 then -- cmdline-mode: paste only 1 line.
|
||||
got_line1 = (#lines > 1)
|
||||
vim.api.nvim_set_option('paste', true) -- For nvim_input().
|
||||
local line1, _ = string.gsub(lines[1], '[\r\n\012\027]', ' ') -- Scrub.
|
||||
local line1 = lines[1]:gsub('<', '<lt>'):gsub('[\r\n\012\027]', ' ') -- Scrub.
|
||||
vim.api.nvim_input(line1)
|
||||
vim.api.nvim_set_option('paste', false)
|
||||
elseif mode ~= 'c' then -- Else: discard remaining cmdline-mode chunks.
|
||||
|
Reference in New Issue
Block a user