From d6d2537de97b0dcd52fc711a82cbceb936ee4c2e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 23 Jul 2003 11:37:42 +0000 Subject: Patch from Alexey to fold literal strings and comments. --- 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 159bc1585..159168602 100644 --- a/src/LexLua.cxx +++ b/src/LexLua.cxx @@ -270,8 +270,13 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W } else if (ch == '}' || ch == ')') { levelCurrent--; } + } else if (style == SCE_LUA_COMMENT || style == SCE_LUA_LITERALSTRING) { + if (ch == '[' && chNext == '[') { + levelCurrent++; + } else if (ch == ']' && chNext == ']') { + levelCurrent--; + } } - if (atEOL) { int lev = levelPrev; if (visibleChars == 0 && foldCompact) { -- cgit v1.2.3