--- rxvt-unicode/src/perl/readline 2006/02/12 05:31:53 1.8 +++ rxvt-unicode/src/perl/readline 2006/02/20 20:48:11 1.10 @@ -39,22 +39,23 @@ my $cur = $line->offset_of ($row, $col); my $ofs = $line->offset_of ($event->{row}, $event->{col}); - if ($ofs >= 0 && $ofs < $line->l) { - my $diff = $ofs - $cur; - my $move; - - if ($diff < 0) { - ($ofs, $cur) = ($cur, $ofs); - $move = "\x1b[D"; - } else { - $move = "\x1b[C"; - } + $ofs >= 0 && $ofs < $line->l + or return; - my $skipped = substr $line->t, $cur, $ofs - $cur; - $skipped =~ s/\x{ffff}//g; + my $diff = $ofs - $cur; + my $move; - $self->tt_write ($move x length $skipped); + if ($diff < 0) { + ($ofs, $cur) = ($cur, $ofs); + $move = "\x1b[D"; + } else { + $move = "\x1b[C"; } - () + my $skipped = substr $line->t, $cur, $ofs - $cur; + $skipped =~ s/\x{ffff}//g; + + $self->tt_write ($move x length $skipped); + + 1 }