Subject: | POE::Wheel::ReadLine print-completions-horizontally uses too much whitespace |
Date: | Tue, 28 Apr 2020 00:22:28 +0100 |
To: | bug-POE [...] rt.cpan.org |
From: | Robert May <robertmay [...] cpan.org> |
v1.367 tested. Appears to still be an issue in v1.368
Unless there's something that I don;t understand (which is quite likely)
then the calculation for the column widths in _complete_list() result in
excessive whitespace.
Code starting at line 2228:
my $cols = int($trk_cols / $width);
$cols = int($trk_cols / ($width+$cols)); # ensure enough room for spaces
$width = int($trk_cols / $cols);
Would be better as
my $cols = int($trk_cols / ($width + 1)); # ensure enough room for
spaces
$width = int($trk_cols / $cols);
Which appears to work fine in my (limited) testing.
Thanks for the great POE hierarchy.
Rob.