aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-03-09 04:09:52 +0000
committernyamatongwe <unknown>2005-03-09 04:09:52 +0000
commita15a13ffde556a1db107592df30275d0875c9913 (patch)
tree81e9ab6945b2e8e691cfdaeef343f3bf0f698d2b
parentafc7afe13b6eb49984e1c9c66eef3cebc1392a09 (diff)
downloadscintilla-mirror-a15a13ffde556a1db107592df30275d0875c9913.tar.gz
Patch from Robert Roessler fixes occasional incorrect colouring of initial character.
-rw-r--r--src/LexCaml.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/LexCaml.cxx b/src/LexCaml.cxx
index ac1bfba5d..5729dd244 100644
--- a/src/LexCaml.cxx
+++ b/src/LexCaml.cxx
@@ -9,6 +9,7 @@
20050205 Quick compiler standards/"cleanliness" adjustment.
20050206 Added cast for IsLeadByte().
20050209 Changes to "external" build support.
+ 20050306 Fix for 1st-char-in-doc "corner" case.
*/
#include <stdlib.h>
@@ -353,7 +354,8 @@ void ColouriseCamlDoc(
// handle state change and char coloring as required
if (state2 >= 0) {
- if (chColor > 0)
+ // (1st char will NOT be colored until AT LEAST 2nd char)
+ if (chColor >= 0)
styler.ColourTo(chColor, state);
state = state2;
}
@@ -362,7 +364,7 @@ void ColouriseCamlDoc(
// do terminal char coloring (JIC)
styler.ColourTo(i, state);
-// styler.Flush(); // (is this always called by calling code?)
+// styler.Flush(); // (is this always done by calling code?)
}
#ifdef BUILD_AS_EXTERNAL_LEXER