fiz console.pl resizing

This commit is contained in:
Dirk Koopman 2021-12-10 16:34:48 +00:00
parent ed671609b5
commit 74db48555c
3 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
10Dec21=======================================================================
1. Fix the output of set/dxgrid, set/usstate and set/dxcq or set/dxitu to how
it was always supposed to be since 2003.
2. Fix console.pl resizing.
09Dec21=======================================================================
1. Moved isregistered to DXChannel for safety...
08Dec21=======================================================================

View File

@ -724,6 +724,8 @@ sub process
$dxchan->disconnect;
} elsif ($sort eq 'D') {
; # ignored (an echo)
} elsif ($sort eq 'C') {
$dxchan->width($line); # change number of columns
} elsif ($sort eq 'G') {
$dxchan->enhanced($line);
} else {

View File

@ -131,6 +131,8 @@ sub do_resize
$inscroll = 0;
$spos = @sh < $pagel ? 0 : @sh - $pagel;
show_screen();
$conn->send_later("C$call|$cols") if $conn;
}
# cease communications
@ -242,7 +244,10 @@ sub addtotop
$inbuf =~ s/\s+/ /g;
if (length $inbuf > $cols) {
$Text::Wrap::columns = $cols;
push @sh, split /\n/, wrap('',' ' x 19, $inbuf);
my $token;
($token) = $inbuf =~ m!^(.* de [-\w\d/\#]+\s+|\w{9}\@\d\d:\d\d:\d\d )!;
$token ||= ' ' x 19;
push @sh, split /\n/, wrap('', ' ' x length($token), $inbuf);
} else {
push @sh, $inbuf;
}