From 670c2d4c9d1f9b164f8dfaf73de4a2617822e368 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 5 Jul 2019 15:58:22 -0700 Subject: [PATCH] type_very_safely: use looser still screen similarity type_very_safely commonly gets stuck waiting on a still screen at the end because when you're typing, there's often a flashing cursor, and the default similarity for wait_still_screen is 47 which is tight enough that a flashing cursor usually fails it. So back it off to 45. Signed-off-by: Adam Williamson --- lib/utils.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils.pm b/lib/utils.pm index 7c35fd0c..d6376a53 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -29,7 +29,9 @@ sub type_safely { sub type_very_safely { my $string = shift; type_string($string, wait_screen_change => 1, max_interval => 1); - wait_still_screen 5; + # similarity level 45 as there will commonly be a flashing + # cursor and the default level (47) is slightly too tight + wait_still_screen(stilltime=>5, similarity_level=>45); } # Figure out what tty the desktop is on, switch to it. Assumes we're