aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexPython.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-02-11 02:15:56 +0000
committernyamatongwe <devnull@localhost>2002-02-11 02:15:56 +0000
commitbc4593ab2fd07b59d3709d36ec951d3fbf0e44ff (patch)
tree8fccbc9b0127de0aa755ebbef0a78b4ca1609bad /src/LexPython.cxx
parent58a3f8eee17d6d083c09822ea83719980fbb2b3e (diff)
downloadscintilla-mirror-bc4593ab2fd07b59d3709d36ec951d3fbf0e44ff.tar.gz
Changes to tighten up styling beyond the bounds of the document.
May not be permanent.
Diffstat (limited to 'src/LexPython.cxx')
-rw-r--r--src/LexPython.cxx6
1 files changed, 4 insertions, 2 deletions
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);
}
}
}