aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-04-30 23:22:21 +1000
committernyamatongwe <devnull@localhost>2013-04-30 23:22:21 +1000
commit896e9b2579b3dd632b44474227ec762a8be6160e (patch)
tree0dd4e508c9fb9ba6a7f3b6b7125c70e67ea28d77
parente90e25bd879ef8a0a672f7d192ab6bf89d022ec8 (diff)
downloadscintilla-mirror-896e9b2579b3dd632b44474227ec762a8be6160e.tar.gz
Bug: [#1468]. Latex highlighting breaks Unicode characters if preceeded by \.
From Colomban Wendling.
-rw-r--r--lexers/LexLaTeX.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/lexers/LexLaTeX.cxx b/lexers/LexLaTeX.cxx
index 6f9612d7b..f3b14054c 100644
--- a/lexers/LexLaTeX.cxx
+++ b/lexers/LexLaTeX.cxx
@@ -224,7 +224,7 @@ void SCI_METHOD LexerLaTeX::Lex(unsigned int startPos, int length, int initStyle
chNext = styler.SafeGetCharAt(i + 1);
} else if (chNext == '\r' || chNext == '\n') {
styler.ColourTo(i, SCE_L_ERROR);
- } else {
+ } else if (isascii(chNext)) {
styler.ColourTo(i + 1, SCE_L_SHORTCMD);
if (chNext == '(') {
mode = 1;
@@ -340,7 +340,7 @@ void SCI_METHOD LexerLaTeX::Lex(unsigned int startPos, int length, int initStyle
chNext = styler.SafeGetCharAt(i + 1);
} else if (chNext == '\r' || chNext == '\n') {
styler.ColourTo(i, SCE_L_ERROR);
- } else {
+ } else if (isascii(chNext)) {
if (chNext == ')') {
mode = 0;
state = SCE_L_DEFAULT;
@@ -382,7 +382,7 @@ void SCI_METHOD LexerLaTeX::Lex(unsigned int startPos, int length, int initStyle
chNext = styler.SafeGetCharAt(i + 1);
} else if (chNext == '\r' || chNext == '\n') {
styler.ColourTo(i, SCE_L_ERROR);
- } else {
+ } else if (isascii(chNext)) {
if (chNext == ']') {
mode = 0;
state = SCE_L_DEFAULT;