aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2006-10-17 00:29:32 +0000
committernyamatongwe <devnull@localhost>2006-10-17 00:29:32 +0000
commitf218144a4c193e1408b2901055a134d42a29ad1b (patch)
treecf96f76cd9d631c924a2d6db647beee37a46cec2 /src
parenta56bf04ea082a26a601694d36051fd2c29b8fe20 (diff)
downloadscintilla-mirror-f218144a4c193e1408b2901055a134d42a29ad1b.tar.gz
Patch from Kein-Hong Man properly handles + or - as operators in numbers
like 1+2.
Diffstat (limited to 'src')
-rw-r--r--src/LexLua.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/LexLua.cxx b/src/LexLua.cxx
index b3a46ad34..c5801139a 100644
--- a/src/LexLua.cxx
+++ b/src/LexLua.cxx
@@ -149,7 +149,10 @@ static void ColouriseLuaDoc(
// We stop the number definition on non-numerical non-dot non-eE non-sign non-hexdigit char
if (!IsANumberChar(sc.ch)) {
sc.SetState(SCE_LUA_DEFAULT);
- }
+ } else if (sc.ch == '-' || sc.ch == '+') {
+ if (sc.chPrev != 'E' && sc.chPrev != 'e')
+ sc.SetState(SCE_LUA_DEFAULT);
+ }
} else if (sc.state == SCE_LUA_IDENTIFIER) {
if (!IsAWordChar(sc.ch) || sc.Match('.', '.')) {
char s[100];