mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
test(api/buffer_updates_spec): prevent flakiness (#30521)
Use poke_eventloop() to wait for Nvim to finish processing input.
(cherry picked from commit 66197dde70
)
This commit is contained in:
committed by
github-actions[bot]
parent
e537379641
commit
d535482ab2
@ -27,12 +27,10 @@ end
|
||||
|
||||
local function sendkeys(keys)
|
||||
api.nvim_input(keys)
|
||||
-- give nvim some time to process msgpack requests before possibly sending
|
||||
-- Wait for Nvim to fully process pending input before possibly sending
|
||||
-- more key presses - otherwise they all pile up in the queue and get
|
||||
-- processed at once
|
||||
local ntime = os.clock() + 0.1
|
||||
repeat
|
||||
until os.clock() > ntime
|
||||
n.poke_eventloop()
|
||||
end
|
||||
|
||||
local function open(activate, lines)
|
||||
|
Reference in New Issue
Block a user