From bc4593ab2fd07b59d3709d36ec951d3fbf0e44ff Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 11 Feb 2002 02:15:56 +0000 Subject: Changes to tighten up styling beyond the bounds of the document. May not be permanent. --- src/LexPython.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/LexPython.cxx') diff --git a/src/LexPython.cxx b/src/LexPython.cxx index 35a5a92be..4af4ca225 100644 --- a/src/LexPython.cxx +++ b/src/LexPython.cxx @@ -156,6 +156,8 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, sc.ChangeState(SCE_P_STRINGEOL); sc.ForwardSetState(SCE_P_DEFAULT); } + if (!sc.More()) + break; } // Check for a state end @@ -166,7 +168,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, if (!IsAWordChar(sc.ch)) { sc.SetState(SCE_P_DEFAULT); } - } else if (sc.state == SCE_P_WORD) { + } else if (sc.state == SCE_P_IDENTIFIER) { if ((sc.ch == '.') || (!IsAWordChar(sc.ch))) { char s[100]; sc.GetCurrent(s, sizeof(s)); @@ -245,7 +247,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, sc.Forward(); } } else if (IsAWordStart(sc.ch)) { - sc.SetState(SCE_P_WORD); + sc.SetState(SCE_P_IDENTIFIER); } } } -- cgit v1.2.3