kakoune/test/regression/0-mouse-during-insert/script
Maxime Coste 39be51b55c Fix regression/0-mouse-during-insert test flakyness
Do not rely on timing but wait for Kakoune to redraw which is what
we actually need: Mouse clicks rely on the current display buffer
to resolve the buffer location, so we need to wait for a redraw
to happen with `ui_out`
2023-08-05 10:58:15 +10:00

11 lines
503 B
Plaintext

ui_out -ignore 4
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
ui_out -ignore 4
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "b" ] }'
ui_out -ignore 4
ui_in '{ "jsonrpc": "2.0", "method": "mouse_release", "params": [ "left", 0, 4 ] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "c<esc>" ] }'
ui_out -ignore 1