From c72fd7f49a38793d81f8a96be8c69db9fa769fe6 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 12 Mar 2016 16:39:54 +0000 Subject: [PATCH] Don't recursively fold, let CM addon do this Also comment out shortcut for now, to reimplement using new lib --- lib/ice-coder.js | 12 +----------- lib/ice-coder.min.js | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 95af13b..6a8609c 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -421,16 +421,6 @@ var ICEcoder = { if (filepath) { filename = filepath.substr(filepath.lastIndexOf("/")+1); fileExt = filename.substr(filename.lastIndexOf(".")+1); - for (var i=changeObj.from.line; i-1 ? "brace" : "xml" ,null ,"+" ,"-", true)(thisCM, i); - } - if (changeObj.text[0] == "}" || changeObj.removed && changeObj.removed[0] == "}") { - cursor = thisCM.getSearchCursor("{",thisCM.getCursor(),false); - cursor.findPrevious(); - for (var i=cursor.from().line; i-1 ? "brace" : "xml" ,null ,"+" ,"-", true)(thisCM, i); - } - } } // Update diffs if we have a split pane if (top.ICEcoder.splitPane) { @@ -3801,7 +3791,7 @@ var ICEcoder = { cMdiff = ICEcoder.getcMdiffInstance(); thisCM = top.ICEcoder.editorFocusInstance.indexOf('diff') > -1 ? cMdiff : cM; var line = thisCM.getCursor().line; - top.contentFrame.CodeMirror.doFold(thisCM.getLine(line).indexOf("{")>-1 ? "brace" : "xml",null,"+","-",false)(thisCM, line); +// top.contentFrame.CodeMirror.doFold(thisCM.getLine(line).indexOf("{")>-1 ? "brace" : "xml",null,"+","-",false)(thisCM, line); return false; diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 9db3bf7..863b8ce 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -14,12 +14,11 @@ a.removeLineClass(top.ICEcoder["cMActiveLine"+b],"background");a.getCursor("star ch:0},{line:c,ch:1E6});setTimeout(function(){for(var c,e=0;ea.getScrollInfo().clientHeight;top.ICEcoder.setLayout()},0);if(0a.defaultTextHeight()&&(f+=b.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",f+"px"]);for(e=0;ea.defaultTextHeight()&&(f+=b.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",f+"px"]);for(e=0;ea.defaultTextHeight()&&(f+=a.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",f+"px"]);for(e=0;e