… | |
… | |
37 | The C<matcher:select> action enables a mode in which it is possible to |
37 | The C<matcher:select> action enables a mode in which it is possible to |
38 | iterate over the matches using the keyboard and either activate them |
38 | iterate over the matches using the keyboard and either activate them |
39 | or copy them to the clipboard. While the mode is active, normal terminal |
39 | or copy them to the clipboard. While the mode is active, normal terminal |
40 | input/output is suspended and the following bindings are recognized: |
40 | input/output is suspended and the following bindings are recognized: |
41 | |
41 | |
42 | =over 4 |
42 | =over |
43 | |
43 | |
44 | =item C<Up> |
44 | =item C<Up> |
45 | |
45 | |
46 | Search for a match upwards. |
46 | Search for a match upwards. |
47 | |
47 | |
… | |
… | |
423 | if (@matches) { |
423 | if (@matches) { |
424 | @matches = sort { $a->[0] <=> $b->[0] or $a->[1] <=> $b->[1] } @matches; |
424 | @matches = sort { $a->[0] <=> $b->[0] or $a->[1] <=> $b->[1] } @matches; |
425 | $self->{matches} = \@matches; |
425 | $self->{matches} = \@matches; |
426 | $self->{cur_row} = $row; |
426 | $self->{cur_row} = $row; |
427 | $self->{id} = $dir < 0 ? @{ $self->{matches} } - 1 : 0; |
427 | $self->{id} = $dir < 0 ? @{ $self->{matches} } - 1 : 0; |
428 | $self->view_start (List::Util::min 0, $row - ($self->nrow >> 1)); |
428 | $self->view_start ($row - ($self->nrow >> 1)); |
429 | $self->want_refresh; |
429 | $self->want_refresh; |
430 | return 1; |
430 | return 1; |
431 | } |
431 | } |
432 | |
432 | |
433 | $row = $dir < 0 ? $line->beg - 1 : $line->end + 1; |
433 | $row = $dir < 0 ? $line->beg - 1 : $line->end + 1; |