# HG changeset patch # User Laurent Bessard # Date 1368120997 -7200 # Node ID 1ec5b4d244f34ddd243eebb3d7575565141b0e73 # Parent 9303f6b900fec94c395c0414784315ab329247d2 Fix bug with multiline Pragma syntax highlighting in TextViewer diff -r 9303f6b900fe -r 1ec5b4d244f3 editors/TextViewer.py --- 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]: