aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexLua.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-08-07 10:13:31 +0000
committernyamatongwe <unknown>2001-08-07 10:13:31 +0000
commitf820761d6c2cbf5e64d4f7915e808eda1bc2cb0c (patch)
tree89816cbaa7e9e3306bfb51dafbf1247d940af518 /src/LexLua.cxx
parenta9c537fc3bd9a675de1bb54c394c42a39bcf78f9 (diff)
downloadscintilla-mirror-f820761d6c2cbf5e64d4f7915e808eda1bc2cb0c.tar.gz
Patch from Philippe to set literal string state correctly based on
initial state.
Diffstat (limited to 'src/LexLua.cxx')
-rw-r--r--src/LexLua.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/LexLua.cxx b/src/LexLua.cxx
index 7bd06b430..2791d98ad 100644
--- a/src/LexLua.cxx
+++ b/src/LexLua.cxx
@@ -75,7 +75,12 @@ static void ColouriseLuaDoc(unsigned int startPos,
char chNext = styler[startPos];
unsigned int lengthDoc = startPos + length;
bool firstChar = true;
- int literalString = 0;
+
+ /* Must initialize the literalString level, if we are inside such a string.
+ * Note: this isn't enough, because literal strings can be nested,
+ * we should go back to see at what level we are...
+ */
+ int literalString = (initStyle == SCE_LUA_LITERALSTRING) ? 1 : 0;
styler.StartSegment(startPos);
for (unsigned int i = startPos; i <= lengthDoc; i++) {