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

Comparing rxvt-unicode/src/perl/readline (file contents):
Revision 1.3 by root, Fri Jan 20 22:49:34 2006 UTC vs.
Revision 1.4 by root, Sat Jan 21 08:07:39 2006 UTC

1#! perl 1#! perl
2 2
3sub on_button_press { 3sub on_button_press {
4 my ($self, $event) = @_; 4 my ($self, $event) = @_;
5
6 return
7 if $self->current_screen || $self->hidden_cursor;
5 8
6 my ($row, $col) = $self->screen_cur; 9 my ($row, $col) = $self->screen_cur;
7 my $line = $self->line ($row); 10 my $line = $self->line ($row);
8 my $cur = $line->offset_of ($row, $col); 11 my $cur = $line->offset_of ($row, $col);
9 my $ofs = $line->offset_of ($event->{row}, $event->{col}); 12 my $ofs = $line->offset_of ($event->{row}, $event->{col});
10 13
11 if ($ofs >= 0 && $ofs < $line->l && !$self->current_screen) { 14 if ($ofs >= 0 && $ofs < $line->l) {
12 my $diff = $ofs - $cur; 15 my $diff = $ofs - $cur;
13 my $move; 16 my $move;
14 17
15 if ($diff < 0) { 18 if ($diff < 0) {
16 ($ofs, $cur) = ($cur, $ofs); 19 ($ofs, $cur) = ($cur, $ofs);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines