Changeset 873
- Timestamp:
- 11/10/08 13:25:10 (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
lib/Padre/Wx/Dialog/Preferences.pm (modified) (1 diff)
-
lib/Padre/Wx/Editor.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r864 r873 1 1 Changes for Padre. 2 3 Fix the failing plugin manager test. (SZABGAB) 4 Add configuration option to the autoindentation (no, same_level, deep). (SZABGAB) 5 Temporarily stop using File::ShareDir::PAR. (SZABGAB) 2 6 3 7 0.16 2008.11.09 -
trunk/lib/Padre/Wx/Dialog/Preferences.pm
r872 r873 94 94 $config->{$f} = $data->{$f} ? 1 :0; 95 95 } 96 $config->{main_startup} = $main_startup[ $data->{main_startup} ]; 96 97 $config->{main_startup} = $main_startup[ $data->{main_startup} ]; 98 $config->{editor_autoindent} = $editor_autoindent[ $data->{editor_autoindent} ]; 97 99 98 100 return; -
trunk/lib/Padre/Wx/Editor.pm
r863 r873 304 304 my ($self) = @_; 305 305 306 my $config = Padre->ide->config; 307 return if not $config->{editor_autoindent} or $config->{editor_autoindent} eq 'no'; 308 306 309 my $pos = $self->GetCurrentPos; 307 310 my $prev_line = $self->LineFromPosition($pos) -1; … … 313 316 my $content = $self->GetTextRange($start, $end); 314 317 #print "'$content'\n"; 318 my $indent = ''; 315 319 if ($content =~ /^(\s+)/) { 316 my $indent = $1; 320 $indent = $1; 321 } 322 if ($config->{editor_autoindent} eq 'deep' and $content =~ /\{\s*$/) { 323 $indent .= "\t"; 324 } 325 if ($indent ne '') { 317 326 $self->InsertText($pos, $indent); 318 327 $self->GotoPos($pos + length($indent)); 319 328 } 320 329 321 330 return; 322 331 }
Note: See TracChangeset
for help on using the changeset viewer.
