… | |
… | |
59 | } |
59 | } |
60 | |
60 | |
61 | sub idle { |
61 | sub idle { |
62 | my ($self) = @_; |
62 | my ($self) = @_; |
63 | |
63 | |
64 | $self->msg ("scrollback search, escape=exit, enter=accept, /=start search, n=next, p=previous"); |
64 | $self->msg ("scrollback search, escape=exit, enter=accept, /=start search, n=next, p=previous, G=bottom"); |
65 | |
65 | |
66 | delete $self->{in_search}; |
66 | delete $self->{in_search}; |
67 | } |
67 | } |
68 | |
68 | |
69 | sub search { |
69 | sub search { |
… | |
… | |
92 | |
92 | |
93 | $row = $line->beg - 1; |
93 | $row = $line->beg - 1; |
94 | } |
94 | } |
95 | |
95 | |
96 | $self->msg ("enter/type/backspace: /$self->{search}_" |
96 | $self->msg ("enter/type/backspace: /$self->{search}_" |
97 | . ($self->{found} ? " (not found)" : "")); |
97 | . ($self->{found} ? "" : " (not found)")); |
98 | $self->scr_bell unless $self->{found}; |
98 | $self->scr_bell unless $self->{found}; |
99 | } |
99 | } |
100 | |
100 | |
101 | sub refresh { |
101 | sub refresh { |
102 | my ($self) = @_; |
102 | my ($self) = @_; |
… | |
… | |
139 | } elsif ($keysym == 0xff54) { |
139 | } elsif ($keysym == 0xff54) { |
140 | $self->view_start ($self->view_start - 1); |
140 | $self->view_start ($self->view_start - 1); |
141 | } elsif ($string eq "/") { |
141 | } elsif ($string eq "/") { |
142 | $self->{in_search} = $self->view_start; |
142 | $self->{in_search} = $self->view_start; |
143 | $self->search; |
143 | $self->search; |
|
|
144 | } elsif ($string eq "G") { |
|
|
145 | $self->view_start (0); |
144 | } elsif ($string eq "n") { |
146 | } elsif ($string eq "n") { |
145 | $self->search; |
147 | $self->search; |
146 | } elsif ($string eq "p") { |
148 | } elsif ($string eq "p") { |
|
|
149 | # TODO |
147 | } elsif ($string ne "") { |
150 | } elsif ($string ne "") { |
148 | $self->scr_bell; |
151 | $self->scr_bell; |
149 | } |
152 | } |
150 | } |
153 | } |
151 | |
154 | |