From: espie Date: Sat, 30 Jan 2021 10:37:22 +0000 (+0000) Subject: rework API slightly, so that handle_continue is an explicit method X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=33ae5dab73ab02bdb5461994230413371234086c;p=openbsd rework API slightly, so that handle_continue is an explicit method (to be overrideen by subclasses when needed) --- diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 51c7b7f2c1e..38d3c6f82b9 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.65 2021/01/08 14:21:37 espie Exp $ +# $OpenBSD: State.pm,v 1.66 2021/01/30 10:37:22 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -128,6 +128,12 @@ sub repo return $self->{repo}; } +sub handle_continue +{ + my $self = shift; + $self->find_window_size(1); +} + sub sync_display { } @@ -375,7 +381,7 @@ sub find_window_size }; } $SIG{'CONT'} = sub { - $self->find_window_size(1); + $self->handle_continue; } } diff --git a/usr.sbin/pkg_add/OpenBSD/State.pod b/usr.sbin/pkg_add/OpenBSD/State.pod index a6b002e4666..85d27cb2660 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pod +++ b/usr.sbin/pkg_add/OpenBSD/State.pod @@ -1,4 +1,4 @@ -$OpenBSD: State.pod,v 1.1 2020/12/20 15:30:58 daniel Exp $ +$OpenBSD: State.pod,v 1.2 2021/01/30 10:37:22 espie Exp $ =head1 NAME @@ -108,6 +108,11 @@ string. basic formatting function used by C and friends, return the formatted string. +=item $state->handle_continue; + +callback for C, to be overridden by subclasses if some specific +treatment (such as terminal redraw/reset) is needed. + =back =head1 BUGS