diff --git a/static/js/editors.js b/static/js/editors.js index 897ac22..40a8b61 100644 --- a/static/js/editors.js +++ b/static/js/editors.js @@ -22,7 +22,7 @@ var editors = { if (editors.data[i].editor.options.path === path) { return editors.data[i].editor; } - } + } }, close: function () { $(".edit-panel .tabs > div[data-index=" + $(".edit-panel .frame").data("index") + "]").find(".ico-close").click(); @@ -613,6 +613,12 @@ var editors = { } }); }; + + CodeMirror.commands.selectIdentifier = function (cm) { + var cur = cm.getCursor(); + var word = cm.findWordAt(cur); + cm.extendSelection(word.anchor, word.head); + }; }, appendSearch: function (data, type, key) { var searcHTML = '