aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-06-12 01:53:56 +0000
committernyamatongwe <unknown>2009-06-12 01:53:56 +0000
commit34283cad390f33eec27eed5648fe873a8558a6dd (patch)
treed6243d1be29cf18d7fdff3ecf530cb66adafaca7 /src
parent1f94acb3565d73287c05cb769f645b06a8d6324f (diff)
downloadscintilla-mirror-34283cad390f33eec27eed5648fe873a8558a6dd.tar.gz
Fix for bug #2804760
— is a 3 byte character in UTF-8 and the XML lexer decided it wasn't a valid entity after the first byte leading to drawing broken part characters. Fixed in the lexer by not including the initial byte in the entity def style.
Diffstat (limited to 'src')
-rw-r--r--src/LexHTML.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index b146d071d..a8d7e2711 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -1132,7 +1132,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
}
if (ch != '#' && !(isascii(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway...
&& ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML
- styler.ColourTo(i, SCE_H_TAGUNKNOWN);
+ if (!isascii(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style
+ styler.ColourTo(i-1, SCE_H_TAGUNKNOWN);
+ else
+ styler.ColourTo(i, SCE_H_TAGUNKNOWN);
state = SCE_H_DEFAULT;
}
break;