mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 19:11:52 +00:00
fix(cmdline): avoid 'incsearch' recursion after redraw #39303
Problem: A vim.ui_attach() callback that redraws to show a 'verbose'
regex message during 'incsearch' results in recusive redrawing.
Solution: Check that curwin was redrawn instead of just any window when
determining if 'incsearch' highlighting was cleared.
This commit is contained in:
@@ -263,6 +263,18 @@ describe('cmdline2', function()
|
||||
]])
|
||||
t.eq({ CmdlineChanged = 1, CursorMovedC = 1 }, exec_lua('return _G.events'))
|
||||
end)
|
||||
|
||||
it("no 'incsearch' recursion with 'verbose' regex message", function()
|
||||
exec('set verbose=1')
|
||||
feed([[:%s/.\{//}]])
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|*9
|
||||
{3: }|
|
||||
Switching to backtracking RE engine for pattern: .\{ |*2
|
||||
{16::}%{15:s}{16:/.\{//}^ } |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('cmdline2', function()
|
||||
|
||||
Reference in New Issue
Block a user