… | |
… | |
44 | or warn "unable to register '$hotkey' as scrollback search start hotkey\n"; |
44 | or warn "unable to register '$hotkey' as scrollback search start hotkey\n"; |
45 | |
45 | |
46 | () |
46 | () |
47 | } |
47 | } |
48 | |
48 | |
|
|
49 | sub on_user_command { |
|
|
50 | my ($self, $cmd) = @_; |
|
|
51 | |
|
|
52 | $cmd eq "searchable-scrollback:start" |
|
|
53 | and $self->enter; |
|
|
54 | |
|
|
55 | () |
|
|
56 | } |
|
|
57 | |
49 | sub on_action { |
58 | sub on_action { |
50 | my ($self, $action) = @_; |
59 | my ($self, $action) = @_; |
51 | |
60 | |
52 | $action eq "start" |
61 | $action eq "start" |
53 | and $self->enter; |
62 | and $self->enter; |
… | |
… | |
122 | } while $text =~ /$re/g; |
131 | } while $text =~ /$re/g; |
123 | |
132 | |
124 | $self->{row} = $row; |
133 | $self->{row} = $row; |
125 | $self->view_start (List::Util::min 0, $row - ($self->nrow >> 1)); |
134 | $self->view_start (List::Util::min 0, $row - ($self->nrow >> 1)); |
126 | $self->want_refresh; |
135 | $self->want_refresh; |
127 | last; |
136 | return; |
128 | } |
137 | } |
129 | |
138 | |
130 | $row = $dir < 0 ? $line->beg - 1 : $line->end + 1; |
139 | $row = $dir < 0 ? $line->beg - 1 : $line->end + 1; |
131 | } |
140 | } |
132 | } |
141 | } |
133 | |
142 | |
134 | $self->scr_bell unless $self->{found}; |
143 | $self->scr_bell; |
135 | } |
144 | } |
136 | |
145 | |
137 | sub refresh { |
146 | sub refresh { |
138 | my ($self) = @_; |
147 | my ($self) = @_; |
139 | |
148 | |