diff options
-rw-r--r-- | src/LexProgress.cxx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/LexProgress.cxx b/src/LexProgress.cxx index 3b3a44541..c21356960 100644 --- a/src/LexProgress.cxx +++ b/src/LexProgress.cxx @@ -65,21 +65,24 @@ static void Colourise4glDoc(unsigned int startPos, int length, int initStyle, Wo // Handle line continuation generically. if (sc.ch == '~') { - // Skip whitespace between ~ and EOL - /* do { + if (sc.chNext > ' ') { + // skip special char after ~ sc.Forward(); - } */ - while ((sc.chNext == ' ' || sc.chNext == '\t') ) { - sc.Forward(); - sc.More(); + continue; } - if (sc.chNext == '\n' || sc.chNext == '\r') { - sc.Forward(); - if (sc.ch == '\r' && sc.chNext == '\n') { + else { + // Skip whitespace between ~ and EOL + while (sc.More() && (sc.chNext == ' ' || sc.chNext == '\t') ) { sc.Forward(); } - sc.Forward(); - continue; + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + sc.Forward(); + continue; + } } } // Determine if a new state should be terminated. @@ -269,3 +272,5 @@ static const char * const FglWordLists[] = { }; LexerModule lmProgress(SCLEX_PS, Colourise4glDoc, "progress", Fold4glDoc, FglWordLists); + + |