aboutsummaryrefslogtreecommitdiffstats
path: root/bin/fair-viewer
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-03-14 02:08:16 +0200
committerJesús <heckyel@hyperbola.info>2020-03-14 12:09:26 -0500
commit169a1be8cc6b2d71edf3308612de07338767f15c (patch)
tree65c7a8d1cea3b99087eb3f0ab8674f8ffe58af06 /bin/fair-viewer
parent7c60323c51dd57dbecea3d4e14f059e40b07bb54 (diff)
downloadfair-viewer-169a1be8cc6b2d71edf3308612de07338767f15c.tar.lz
fair-viewer-169a1be8cc6b2d71edf3308612de07338767f15c.tar.xz
fair-viewer-169a1be8cc6b2d71edf3308612de07338767f15c.zip
Support three-digit video selection.
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'bin/fair-viewer')
-rwxr-xr-xbin/fair-viewer6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/fair-viewer b/bin/fair-viewer
index f6159bc..0600c20 100755
--- a/bin/fair-viewer
+++ b/bin/fair-viewer
@@ -1943,7 +1943,7 @@ sub get_user_input {
if ($opt{history}) {
my $str = join(' ', grep { /\w/ } @{$args}, @{$keywords});
- if ($str ne '' and $str !~ /^[0-9]{1,2}\z/) {
+ if ($str ne '' and $str !~ /^[0-9]{1,3}\z/) {
$term->append_history(1, $opt{history_file});
}
}
@@ -2425,7 +2425,7 @@ sub get_reply {
sub valid_num {
my ($num, $array_ref) = @_;
- return $num =~ /^[0-9]{1,2}\z/ && $num != 0 && $num <= @{$array_ref};
+ return $num =~ /^[0-9]{1,3}\z/ && $num != 0 && $num <= @{$array_ref};
}
sub adjust_width {
@@ -3005,7 +3005,7 @@ sub get_valid_numbers {
foreach my $id (split(/[,\s]+/, $input)) {
push @output,
$id =~ /$range_num_re/ ? get_range_numbers($1, $2)
- : $id =~ /^[0-9]{1,2}\z/ ? $id
+ : $id =~ /^[0-9]{1,3}\z/ ? $id
: next;
}