From 5b32c96f1dea12f587734afe4e0f9aa1f2786a15 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 29 Jun 2013 17:25:50 +0100 Subject: [PATCH] Determin fold type by { char existence Don't assume if it's a certain file type it will be folding on braces, instead fold on braces if there's a brace char on that line --- lib/file-control.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/file-control.php b/lib/file-control.php index 1d4b509..8286a56 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -367,7 +367,11 @@ if (action=="load") { top.ICEcoder.nextcMInstance++; top.ICEcoder.openFileMDTs.push(''); for (var i=0; i') > -1 ? "braceRangeFinder" : "tagRangeFinder"],null,"+","-",true)(cM, i); + top.ICEcoder.content.contentWindow.CodeMirror.newFoldFunction(top.ICEcoder.content.contentWindow.CodeMirror[ + cM.getLine(i).indexOf("{")>-1 + ? "braceRangeFinder" + : "tagRangeFinder" + ],null,"+","-",true)(cM, i); } top.ICEcoder.loadingFile = false;