Show
Ignore:
Timestamp:
03/14/08 17:19:59 (8 months ago)
Author:
rob
Message:

Added electricChar to autoindent
* electricChar is used in the OnChar? method of FundamentalMode? to automatically reindent a line if a certain char is pressed
* converted PythonMode?'s ElectricColon? into electricChar method of PythonAutoindent?
* added CStyleAutoindent's electricChar to handle opening and closing braces and semicolon

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/fundamental.py

    r1166 r1170  
    400400        """ 
    401401        uchar = unichr(evt.GetKeyCode()) 
     402        if self.autoindent.electricChar(self, uchar): 
     403            # If the autoindenter handles the char, it will insert the char. 
     404            # So, we don't call Skip in this case and the processing ends 
     405            # here. 
     406            return 
    402407        if self.classprefs.spell_check and uchar in self.word_end_chars: 
    403408            # We are catching the event before the character is added to the