From 422fb7c00d583fa458559af211708ad8658d66e3 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 14 Jun 2010 08:17:38 +0000 Subject: screen does not have hpa, but we can make do with \r cuf. fixes flickering under tmux... --- usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'usr.sbin/pkg_add/OpenBSD') 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 # @@ -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'; -- cgit v1.2.3