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`
This commit is contained in:
parent
d7822ea588
commit
39be51b55c
|
@ -1,15 +1,10 @@
|
||||||
ui_out -ignore 4
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
|
||||||
sleep .1
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
|
||||||
sleep .1
|
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "b" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "b" ] }'
|
||||||
sleep .1
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "mouse_release", "params": [ "left", 0, 4 ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "mouse_release", "params": [ "left", 0, 4 ] }'
|
||||||
sleep .1
|
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "c<esc>" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "c<esc>" ] }'
|
||||||
sleep .1
|
ui_out -ignore 1
|
||||||
if [ -n "$CI" ]; then
|
|
||||||
sleep 1
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user