neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 66197dde7084484c9d23fa488b2288bcae364ba7
parent 80709882476206b8f1ab3c004c82a1efd039c684
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 26 Sep 2024 18:34:35 +0800

test(api/buffer_updates_spec): prevent flakiness (#30521)

Use poke_eventloop() to wait for Nvim to finish processing input.
Diffstat:
Mtest/functional/api/buffer_updates_spec.lua | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/test/functional/api/buffer_updates_spec.lua b/test/functional/api/buffer_updates_spec.lua @@ -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)