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

Force preprocessor directives to start at column zero

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/lib/autoindent.py

    r1168 r1169  
    213213        fold = stc.GetFoldLevel(linenum)&wx.stc.STC_FOLDLEVELNUMBERMASK - wx.stc.STC_FOLDLEVELBASE 
    214214        c = stc.GetCharAt(pos) 
     215        s = stc.GetStyleAt(pos) 
    215216        self.dprint("col=%d (pos=%d), fold=%d char=%s" % (col, pos, fold, c)) 
    216217        if c == ord('}'): 
     
    218219            # force that here. 
    219220            fold -= 1 
     221        elif c == ord('#') and s == 9: 
     222            # Force preprocessor directives to start at column zero 
     223            fold = 0 
    220224 
    221225        return fold * stc.GetIndent()