Rather than an arbitrary count limit, use pane_too_long() to limit how
much work is done in the background.
But keep the low limit when TESTING so the test has something
interesting too see.
Signed-off-by: NeilBrown <neil@brown.name>
# a contiguous unchecked section in the range
import edlib
+import os
def show_range(action, focus, viewnum, attr):
edlib.LOG("range:", attr, action)
# nothing to do
return edlib.Efail
+ self.set_time()
focus = focus.leaf
- remain = 20
+ if 'EDLIB_TESTING' in os.environ:
+ remain = 20
+ else:
+ remain = 200
ch = None
- while start < end and remain > 0:
+ while start < end and remain > 0 and not self.too_long():
remain -= 1
ed = start.dup()
focus.call("Spell:NextWord", ed)