summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-06-14 08:17:38 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-06-14 08:17:38 +0000
commit422fb7c00d583fa458559af211708ad8658d66e3 (patch)
treed0ffea653966937645dac40eaa61ec3e5f411681 /usr.sbin/pkg_add/OpenBSD
parent4a4dc09839da9372a5699275901ebab15fda415f (diff)
screen does not have hpa, but we can make do with \r cuf.
fixes flickering under tmux...
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm b/usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm
index c2794d77ce2..513da21f50c 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.9 2010/06/11 23:51:16 espie Exp $
+# $OpenBSD: Term.pm,v 1.10 2010/06/14 08:17:37 espie Exp $
#
# Copyright (c) 2004-2007 Marc Espie <espie@openbsd.org>
#
@@ -74,6 +74,13 @@ sub init
$self->{glitch} = $self->{terminal}->Tputs("xn", 1);
$self->{cleareol} = $self->{terminal}->Tputs("ce", 1);
$self->{hpa} = $self->{terminal}->Tputs("ch", 1);
+ if (!defined $self->{hpa}) {
+ # XXX this works with screen and tmux
+ $self->{cuf} = $self->{terminal}->Tputs("RI", 1);
+ if (defined $self->{cuf}) {
+ $self->{hpa} = "\r".$self->{cuf};
+ }
+ }
}
my $wsz_format = 'SSSS';