]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[tmux-nicklist-portable] bug fix
authorsteinex <redacted>
Wed, 6 Feb 2019 23:08:18 +0000 (00:08 +0100)
committerbw1 <redacted>
Wed, 6 Feb 2019 23:08:18 +0000 (00:08 +0100)
scripts/tmux-nicklist-portable.pl

index c3f6bee304e4e50e5d206d6ca08c46bcb6d5b6eb..e0c6920720fa2c973aa61f1b8d5ef56aec71ca5e 100644 (file)
@@ -48,7 +48,7 @@ use IO::Select;
 use POSIX;
 use File::Temp qw/ :mktemp  /;
 use File::Basename;
-our $VERSION = '0.1.7';
+our $VERSION = '0.1.8';
 our %IRSSI = (
   authors     => 'Thiago de Arruda',
   contact     => 'tpadilha84@gmail.com',
@@ -310,17 +310,17 @@ sub move_down {
   my $nickcount = $#nicknames;
   return if ($nickcount <= $rows);
   if ($count == -1) {
-    $current_line = $nickcount - $rows - 1;
+    $current_line = $nickcount - $rows + 1;
     redraw;
     return;
   }
-  my $visible = $nickcount - $current_line - $count;
+  my $visible = $nickcount - $current_line - $count + 1;
   if ($visible > $rows) {
     $current_line += $count;
     redraw;
   } elsif (($visible + $count) > $rows) {
     # scroll the maximum we can
-    $current_line = $nickcount - $rows - 1;
+    $current_line = $nickcount - $rows + 1;
     redraw;
   }
 }
git clone https://git.99rst.org/PROJECT