diff options
| author | nyamatongwe <devnull@localhost> | 2009-06-12 01:53:56 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2009-06-12 01:53:56 +0000 |
| commit | e471d01efe2d893df610ac7e0c5d5a659530fa05 (patch) | |
| tree | d6243d1be29cf18d7fdff3ecf530cb66adafaca7 | |
| parent | 5e53732eeae0f715f343b536dc0e17295c3b55a4 (diff) | |
| download | scintilla-mirror-e471d01efe2d893df610ac7e0c5d5a659530fa05.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.
| -rw-r--r-- | src/LexHTML.cxx | 5 |
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; |
