mirror of
https://github.com/neovim/neovim.git
synced 2026-09-04 13:20:34 +00:00
fix(multicursor): 'autocomplete' during insert-cascade raises E565 #41625
Problem: With mcursors and 'autocomplete', a non-literal key (`<BS>`) during an active completion attempts to insert-cascade, which attempts a nested `edit()`, which refuses with E565. Solution: Defer the flush while completion is active; the pending keys will be handled later.
This commit is contained in:
@@ -1401,6 +1401,17 @@ describe('multicursor', function()
|
||||
feed('cc')
|
||||
feed('f<C-n><C-n><C-e><Esc>') -- cycle, then cancel back to the leader
|
||||
eq({ 'f', 'f', 'f' }, { get_lines()[4], get_lines()[5], get_lines()[6] })
|
||||
|
||||
-- No candidates, {Visual}Q cursors: <BS> mid-completion. #41602
|
||||
clear_cursors()
|
||||
api.nvim_buf_set_lines(0, 0, -1, true, { '', '', '' })
|
||||
command('let v:errmsg = ""')
|
||||
feed('VggQ')
|
||||
feed('i a<BS>')
|
||||
eq('', api.nvim_get_vvar('errmsg'))
|
||||
feed('<Esc>')
|
||||
eq('', api.nvim_get_vvar('errmsg'))
|
||||
eq({ ' ', ' ', ' ' }, get_lines())
|
||||
end)
|
||||
|
||||
it('InsertCharPre-driven complete() plugin (cmp-style)', function()
|
||||
|
||||
Reference in New Issue
Block a user