mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 09:14:24 +00:00
feat(api): add nvim__redraw for more granular redrawing
Experimental and subject to future changes. Add a way to redraw certain elements that are not redrawn while Nvim is waiting for input, or currently have no API to do so. This API covers all that can be done with the :redraw* commands, in addition to the following new features: - Immediately move the cursor to a (non-current) window. - Target a specific window or buffer to mark for redraw. - Mark a buffer range for redraw (replaces nvim__buf_redraw_range()). - Redraw the 'statuscolumn'.
This commit is contained in:
@@ -2594,6 +2594,12 @@ it(':substitute with inccommand, timer-induced :redraw #9777', function()
|
||||
{2:[Preview] }|
|
||||
:%s/foo/ZZZ^ |
|
||||
]])
|
||||
|
||||
-- Also with nvim__redraw()
|
||||
command('call timer_start(10, {-> nvim__redraw(#{flush:1})}, {"repeat":-1})')
|
||||
command('call timer_start(10, {-> nvim__redraw(#{statusline:1})}, {"repeat":-1})')
|
||||
sleep(20) -- Allow some timer activity.
|
||||
screen:expect_unchanged()
|
||||
end)
|
||||
|
||||
it(':substitute with inccommand, allows :redraw before first separator is typed #18857', function()
|
||||
|
||||
Reference in New Issue
Block a user