ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/searchable-scrollback
(Generate patch)

Comparing rxvt-unicode/src/perl/searchable-scrollback (file contents):
Revision 1.16 by root, Thu Jan 12 09:40:33 2006 UTC vs.
Revision 1.17 by root, Thu Jan 12 10:02:20 2006 UTC

90 do { 90 do {
91 push @{ $self->{found} }, [$line->coord_of ($-[0]), $line->coord_of ($+[0])]; 91 push @{ $self->{found} }, [$line->coord_of ($-[0]), $line->coord_of ($+[0])];
92 } while $text =~ /$re/g; 92 } while $text =~ /$re/g;
93 93
94 $self->{row} = $row; 94 $self->{row} = $row;
95 $self->view_start (-$row + ($self->nrow >> 1)); 95 $self->view_start (List::Util::max 0, -$row + ($self->nrow >> 1));
96 $self->want_refresh; 96 $self->want_refresh;
97 last; 97 last;
98 } 98 }
99 99
100 $row = $dir < 0 ? $line->beg - 1 : $line->end + 1; 100 $row = $dir < 0 ? $line->beg - 1 : $line->end + 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines