diff --git a/impatient b/impatient index b285cf7..0240e7e 100755 --- a/impatient +++ b/impatient @@ -132,6 +132,11 @@ while True: ), end='') sys.stdout.flush() - if final and current >= args.termination_value_threshold*final and all(d == 0 for d in deltas[-args.termination_inactivity_threshold:]): + if ( + final + and current >= args.termination_value_threshold*final + and len(deltas) >= args.termination_inactivity_threshold + and all(d == 0 for d in deltas[-args.termination_inactivity_threshold:]) + ): print() break