diff --git a/src/brackets.js b/src/brackets.js index 2ea529e9c52..215fbb0b254 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -58,6 +58,9 @@ define(function (require, exports, module) { require("codemirror/addon/search/searchcursor"); require("codemirror/addon/selection/active-line"); require("codemirror/addon/selection/mark-selection"); + require("codemirror/addon/fold/brace-fold"); + require("codemirror/addon/fold/comment-fold"); + require("codemirror/addon/fold/markdown-fold"); require("codemirror/keymap/sublime"); // Load dependent modules diff --git a/src/extensions/default/CodeFolding/main.js b/src/extensions/default/CodeFolding/main.js index 5e5ebd1fdd8..36a999f3671 100644 --- a/src/extensions/default/CodeFolding/main.js +++ b/src/extensions/default/CodeFolding/main.js @@ -57,12 +57,7 @@ define(function (require, exports, module) { expandAllKeyMac = "Cmd-Shift-1"; ExtensionUtils.loadStyleSheet(module, "main.less"); - - // Load CodeMirror addons - brackets.getModule(["thirdparty/CodeMirror/addon/fold/brace-fold"]); - brackets.getModule(["thirdparty/CodeMirror/addon/fold/comment-fold"]); - brackets.getModule(["thirdparty/CodeMirror/addon/fold/markdown-fold"]); - + // Still using slightly modified versions of the foldcode.js and foldgutter.js since we // need to modify the gutter click handler to take care of some collapse and expand features // e.g. collapsing all children when 'alt' key is pressed