Changeset 2276


Ignore:
Timestamp:
12/30/08 07:05:03 (3 years ago)
Author:
szabgab
Message:

move the lexer method to the Document::Perl subclass

Location:
trunk/Padre/lib/Padre
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Document/Perl.pm

    r2232 r2276  
    8383 
    8484 
    85  
    86  
     85sub lexer { 
     86    my $self = shift; 
     87    my $config = Padre->ide->config; 
     88    if ( $config->{ppi_highlight} ) { 
     89        return Wx::wxSTC_LEX_CONTAINER; 
     90    } else { 
     91        return $self->SUPER::lexer(); 
     92    } 
     93} 
    8794 
    8895##################################################################### 
  • trunk/Padre/lib/Padre/Wx/Editor.pm

    r2274 r2276  
    7474    my ($self) = @_; 
    7575 
    76     my $lexer = $self->{Document}->lexer; 
    77      
    78     if ($lexer eq Wx::wxSTC_LEX_PERL) { 
    79         my $config = Padre->ide->config; 
    80         if ( $config->{ppi_highlight} ) { 
    81             $lexer = Wx::wxSTC_LEX_CONTAINER; 
    82         } 
    83     } 
    84      
    85     $self->SetLexer( $lexer ); 
     76    $self->SetLexer( $self->{Document}->lexer ); 
    8677#    $self->Colourise(0, $self->GetTextLength); 
    8778 
Note: See TracChangeset for help on using the changeset viewer.