mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 15:19:12 +08:00
feat(iedit): handle <delete> key in iedit-insert mode
This commit is contained in:
parent
2e49f02244
commit
5cd5e2b531
@ -476,6 +476,15 @@ local function handle_insert(char) -- {{{
|
||||
substitute(cursor_stack[i].cursor_begin, '.$', '', 'g')
|
||||
end
|
||||
end
|
||||
elseif char == k.t('<Delete>') or char == k.t('<C-?>') then
|
||||
for i = 1, #cursor_stack, 1 do
|
||||
if cursor_stack[i].active then
|
||||
cursor_stack[i].cursor_begin =
|
||||
matchstr(cursor_stack[i].cursor_end, '^.')
|
||||
cursor_stack[i].cursor_end =
|
||||
substitute(cursor_stack[i].cursor_end, '^.', '', 'g')
|
||||
end
|
||||
end
|
||||
else
|
||||
for i = 1, #cursor_stack, 1 do
|
||||
if cursor_stack[i].active then
|
||||
|
Loading…
x
Reference in New Issue
Block a user