From: espie Date: Tue, 3 Aug 2010 17:31:52 +0000 (+0000) Subject: missed one if (continued) test, so simplify logic: test continue beforehand. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b86c9fe1dbfe8ac9f3257d33c831c4e6b5623ac2;p=openbsd missed one if (continued) test, so simplify logic: test continue beforehand. fixes display after ^Z/fg. (problem pointed out by Theo) --- diff --git a/usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm b/usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm index 23f5fa81779..d7d67dee0a0 100644 --- a/usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm +++ b/usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Term.pm,v 1.13 2010/08/01 10:26:27 espie Exp $ +# $OpenBSD: Term.pm,v 1.14 2010/08/03 17:31:52 espie Exp $ # # Copyright (c) 2004-2007 Marc Espie # @@ -165,9 +165,17 @@ sub _show } } - return if $d eq $self->{lastdisplay} && !$self->{continued}; + if ($self->{continued}) { + print "\r$d"; + $self->{continued} = 0; + $self->{lastdisplay} = $d; + return; + } + + return if $d eq $self->{lastdisplay}; - if (!$self->{continued} && defined $self->{hpa}) { + + if (defined $self->{hpa}) { if (defined $stars && defined $self->{stars}) { $prefix += $self->{stars}; } @@ -179,7 +187,6 @@ sub _show print "\r$d"; } $self->{lastdisplay} = $d; - $self->{continued} = 0; } sub message