editors/TextViewer.py
changeset 1108 1ec5b4d244f3
parent 1091 5f612651d227
child 1126 26baa0ae9fd7
equal deleted inserted replaced
1107:9303f6b900fe 1108:1ec5b4d244f3
   545                             self.SetStyling(current_pos - last_styled_pos, wx.stc.STC_INDIC0_MASK)
   545                             self.SetStyling(current_pos - last_styled_pos, wx.stc.STC_INDIC0_MASK)
   546                             self.StartStyling(current_pos, 0xff)
   546                             self.StartStyling(current_pos, 0xff)
   547                 else:
   547                 else:
   548                     self.SetStyling(current_pos - last_styled_pos, 31)
   548                     self.SetStyling(current_pos - last_styled_pos, 31)
   549                 last_styled_pos = current_pos
   549                 last_styled_pos = current_pos
   550                 state = SPACE
   550                 if state != DPRAGMA:
       
   551                     state = SPACE
   551                 line = ""
   552                 line = ""
   552                 line_number += 1
   553                 line_number += 1
   553                 self.RefreshLineFolding(line_number)
   554                 self.RefreshLineFolding(line_number)
   554             elif line.endswith("(*") and state != COMMENT:
   555             elif line.endswith("(*") and state != COMMENT:
   555                 self.SetStyling(current_pos - last_styled_pos - 1, 31)
   556                 self.SetStyling(current_pos - last_styled_pos - 1, 31)
   577                     self.SetStyling(current_pos - last_styled_pos, 31)
   578                     self.SetStyling(current_pos - last_styled_pos, 31)
   578                     last_styled_pos = current_pos
   579                     last_styled_pos = current_pos
   579                     state = SPACE
   580                     state = SPACE
   580             elif state == DPRAGMA:
   581             elif state == DPRAGMA:
   581                 if line.endswith("}}"):
   582                 if line.endswith("}}"):
   582                     self.SetStyling(current_pos - last_styled_pos + 2, 31)
   583                     self.SetStyling(current_pos - last_styled_pos + 1, 31)
   583                     last_styled_pos = current_pos + 1
   584                     last_styled_pos = current_pos + 1
   584                     state = SPACE
   585                     state = SPACE
   585             elif (line.endswith("'") or line.endswith('"')) and state not in [STRING, WSTRING]:
   586             elif (line.endswith("'") or line.endswith('"')) and state not in [STRING, WSTRING]:
   586                 self.SetStyling(current_pos - last_styled_pos, 31)
   587                 self.SetStyling(current_pos - last_styled_pos, 31)
   587                 last_styled_pos = current_pos
   588                 last_styled_pos = current_pos