diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/LexPython.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/LexPython.cxx b/src/LexPython.cxx index 47974d1bc..1db5669e1 100644 --- a/src/LexPython.cxx +++ b/src/LexPython.cxx @@ -265,8 +265,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, } else if (IsPyStringStart(sc.ch, sc.chNext, sc.GetRelative(2))) { unsigned int nextIndex = 0; sc.SetState(GetPyStringState(styler, sc.currentPos, &nextIndex)); - while (nextIndex > (sc.currentPos + 1)) { - sc.Forward(); + while (nextIndex > (sc.currentPos + 1) && sc.More()) {
sc.Forward(); } } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_P_IDENTIFIER); |