Changeset 11112
- Timestamp:
- 03/14/10 11:57:28 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Document/Perl.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Document/Perl.pm
r11061 r11112 1293 1293 my $line = $editor->LineFromPosition($pos); 1294 1294 my $first = $editor->PositionFromLine($line); 1295 my $col = $pos - $ editor->PositionFromLine( $editor->LineFromPosition($pos) );1296 my $text = $editor->GetTextRange( $first, ( $pos - $first ));1295 my $col = $pos - $first; 1296 my $text = $editor->GetTextRange($first, $pos); 1297 1297 1298 1298 $editor->AddText( $self->newline ); 1299 1299 1300 $pos = $editor->GetCurrentPos; 1301 $first = $editor->PositionFromLine( $editor->LineFromPosition($pos) ); 1302 1303 # my $col2 = $pos - $first; 1304 # $editor->AddText( ' ' x ( $col - $col2 ) ); 1305 1306 # TO DO: Remove the part made by auto-ident before addtext: 1307 $text =~ s/[^\s\t\r\n]/ /g; 1300 $text =~ s/\S/ /g; 1308 1301 $editor->AddText($text); 1309 1302 1310 $editor->SetCurrentPos( $ first + $col);1303 $editor->SetCurrentPos( $pos + $col + 1); 1311 1304 1312 1305 return 1;
Note: See TracChangeset
for help on using the changeset viewer.
