mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
test(api/buffer_updates_spec): prevent flakiness (#30521)
Use poke_eventloop() to wait for Nvim to finish processing input.
This commit is contained in:
parent
8070988247
commit
66197dde70
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user