From c758a2ff37bc375603a416c4c38d5c7328738f0b Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 5 Apr 2012 07:34:14 +0100 Subject: [PATCH] Gutter click now triggers code folding Clicking gutter in CM editor triggers new code fold/expand function --- editor.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/editor.php b/editor.php index 8205bc3..2c226a2 100644 --- a/editor.php +++ b/editor.php @@ -106,11 +106,12 @@ function createNewCMInstance(num) {window['cM'+num] = CodeMirror(document.body, }; lastKeyCode = e.keyCode; }, + onGutterClick: top.ICEcoder.foldCode, extraKeys: {"Tab": "indentMore", "Shift-Tab": "indentLess"} -}); + }); -// Now create the active line for this CodeMirror object -top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = window['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].setLineClass(0, "cm-s-activeLine"); + // Now create the active line for this CodeMirror object + top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = window['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].setLineClass(0, "cm-s-activeLine"); };