1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-12 09:35:40 +08:00

fix(prompt): fix register matcher

This commit is contained in:
wsdjeg 2022-10-05 21:16:35 +08:00
parent 9e10b60340
commit a6f5e197ba

@ -71,7 +71,7 @@ function M._handle_input(...)
goto continue goto continue
end end
if M._c_r_mode then if M._c_r_mode then
if char == '[a-zA-Z0-9"+:/]$' then if char:match('^[%w":+/]$') then
local reg = '@' .. char local reg = '@' .. char
local paste = vim.fn.get(vim.fn.split(vim.fn.eval(reg), "\n"), 0, '') local paste = vim.fn.get(vim.fn.split(vim.fn.eval(reg), "\n"), 0, '')
M._prompt.cursor_begin = M._prompt.cursor_begin .. paste M._prompt.cursor_begin = M._prompt.cursor_begin .. paste