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.9 by root, Mon Feb 20 20:46:54 2006 UTC vs.
Revision 1.10 by root, Mon Feb 20 20:48:11 2006 UTC

37 my ($row, $col) = $self->screen_cur; 37 my ($row, $col) = $self->screen_cur;
38 my $line = $self->line ($row); 38 my $line = $self->line ($row);
39 my $cur = $line->offset_of ($row, $col); 39 my $cur = $line->offset_of ($row, $col);
40 my $ofs = $line->offset_of ($event->{row}, $event->{col}); 40 my $ofs = $line->offset_of ($event->{row}, $event->{col});
41 41
42 if ($ofs >= 0 && $ofs < $line->l) { 42 $ofs >= 0 && $ofs < $line->l
43 my $diff = $ofs - $cur; 43 or return;
44 my $move;
45 44
46 if ($diff < 0) { 45 my $diff = $ofs - $cur;
47 ($ofs, $cur) = ($cur, $ofs); 46 my $move;
48 $move = "\x1b[D";
49 } else {
50 $move = "\x1b[C";
51 }
52 47
53 my $skipped = substr $line->t, $cur, $ofs - $cur; 48 if ($diff < 0) {
54 $skipped =~ s/\x{ffff}//g; 49 ($ofs, $cur) = ($cur, $ofs);
55 50 $move = "\x1b[D";
56 $self->tt_write ($move x length $skipped); 51 } else {
57 52 $move = "\x1b[C";
58 return 1;
59 } 53 }
60 54
61 () 55 my $skipped = substr $line->t, $cur, $ofs - $cur;
56 $skipped =~ s/\x{ffff}//g;
57
58 $self->tt_write ($move x length $skipped);
59
60 1
62} 61}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines