From b8f1cce1b20d2d8cf3109d2dde297bd92064b8d7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 19 Mar 2004 21:44:53 +0000 Subject: Patch from John Ehresman to prevent a hang when called to lex for 1 character from the start of a multi-character string start. --- src/LexPython.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/LexPython.cxx') 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); -- cgit v1.2.3