From f820761d6c2cbf5e64d4f7915e808eda1bc2cb0c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 7 Aug 2001 10:13:31 +0000 Subject: Patch from Philippe to set literal string state correctly based on initial state. --- src/LexLua.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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++) { -- cgit v1.2.3