From 3689e638aea103d4d5eed65d621cbc5e4b82d129 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 3 May 2000 13:05:08 +0000 Subject: 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. --- src/LexPython.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/LexPython.cxx') 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); } } -- cgit v1.2.3