Changeset 11105 for trunk/Padre/lib/Padre/Action/Edit.pm
- Timestamp:
- 03/13/10 10:45:22 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Action/Edit.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Action/Edit.pm
r11097 r11105 324 324 need_editor => 1, 325 325 label => Wx::gettext('&Select to matching brace'), 326 comment => Wx::gettext('Select to the matching opening or closing brace : { }, ( ), [ ], < >'),326 comment => Wx::gettext('Select to the matching opening or closing brace'), 327 327 shortcut => 'Ctrl-4', 328 menu_event => sub { 329 my $self = shift; 330 my $INVALID_POSITION = Wx::wxSTC_INVALID_POSITION; 331 my $page = $self->current->editor; 332 my $pos1 = $page->GetCurrentPos; 333 my $pos2 = $page->BraceMatch($pos1); 334 if ( $pos2 == $INVALID_POSITION ) { #Wx::wxSTC_INVALID_POSITION 335 if ( $pos1 > 0 ) { 336 $pos1--; 337 $pos2 = $page->BraceMatch($pos1); 338 } 339 } 340 341 if ( $pos2 != $INVALID_POSITION ) { #Wx::wxSTC_INVALID_POSITION 342 my $start = $page->GetSelectionStart(); 343 $page->SetSelection($start, $pos2+1); 344 } 345 346 return; 347 }, 328 menu_event => sub { shift->current->editor->select_to_matching_brace } 348 329 ); 349 330
Note: See TracChangeset
for help on using the changeset viewer.
