fix lua comment folding

This commit is contained in:
nightwing 2013-03-06 20:00:59 +04:00
commit 6c5ab388cf

View file

@ -60,7 +60,7 @@ oop.inherits(FoldMode, BaseFoldMode);
return "start";
} else if (match[2]) {
var type = session.bgTokenizer.getState(row) || "";
if (type.indexOf("comment") != -1 || type.indexOf("string") != -1)
if (type[0] == "bracketedComment" || type[0] == "bracketedString")
return "start";
} else {
return "start";
@ -75,7 +75,7 @@ oop.inherits(FoldMode, BaseFoldMode);
return "end";
} else if (match[0][0] === "]") {
var type = session.bgTokenizer.getState(row - 1) || "";
if (type.indexOf("comment") != -1 || type.indexOf("string") != -1)
if (type[0] == "bracketedComment" || type[0] == "bracketedString")
return "end";
} else
return "end";