editors/TextViewer.py
changeset 1108 1ec5b4d244f3
parent 1091 5f612651d227
child 1126 26baa0ae9fd7
--- a/editors/TextViewer.py	Thu May 09 18:49:08 2013 +0200
+++ b/editors/TextViewer.py	Thu May 09 19:36:37 2013 +0200
@@ -547,7 +547,8 @@
                 else:
                     self.SetStyling(current_pos - last_styled_pos, 31)
                 last_styled_pos = current_pos
-                state = SPACE
+                if state != DPRAGMA:
+                    state = SPACE
                 line = ""
                 line_number += 1
                 self.RefreshLineFolding(line_number)
@@ -579,7 +580,7 @@
                     state = SPACE
             elif state == DPRAGMA:
                 if line.endswith("}}"):
-                    self.SetStyling(current_pos - last_styled_pos + 2, 31)
+                    self.SetStyling(current_pos - last_styled_pos + 1, 31)
                     last_styled_pos = current_pos + 1
                     state = SPACE
             elif (line.endswith("'") or line.endswith('"')) and state not in [STRING, WSTRING]: