aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexPython.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-05-03 13:05:08 +0000
committernyamatongwe <devnull@localhost>2000-05-03 13:05:08 +0000
commit3689e638aea103d4d5eed65d621cbc5e4b82d129 (patch)
tree2b312e07f7bf97325b06b01a53a9da4c771ec91b /src/LexPython.cxx
parent91241e7907cc06c0206dfb967fcdda8126b21f71 (diff)
downloadscintilla-mirror-3689e638aea103d4d5eed65d621cbc5e4b82d129.tar.gz
Fixed problem with initial style not being picked up correctly since the
lexer now starts styling from one line before where it is asked to.
Diffstat (limited to 'src/LexPython.cxx')
-rw-r--r--src/LexPython.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/LexPython.cxx b/src/LexPython.cxx
index f309036a7..df8b7085b 100644
--- a/src/LexPython.cxx
+++ b/src/LexPython.cxx
@@ -52,6 +52,10 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
if (lineCurrent > 0) {
lineCurrent--;
startPos = styler.LineStart(lineCurrent);
+ if (startPos == 0)
+ initStyle = SCE_P_DEFAULT;
+ else
+ initStyle = styler.StyleAt(startPos-1);
}
}