From 169a1be8cc6b2d71edf3308612de07338767f15c Mon Sep 17 00:00:00 2001 From: trizen Date: Sat, 14 Mar 2020 02:08:16 +0200 Subject: Support three-digit video selection. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- bin/fair-viewer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') 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; } -- cgit v1.2.3