!function(){function e(e){return e._matchHighlightState||(e._matchHighlightState=new function(){this.marked=[]})}function t(t,r,i){if(function(t){for(var n=e(t),r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked=[]}(t),i=void 0!==i?i:n,t.somethingSelected()&&t.getSelection().replace(/^\s+|\s+$/g,"").length>=i){var o=e(t),a=t.getSelection();t.operation(function(){if(t.lineCount()<2e3)for(var e=t.getSearchCursor(a);e.findNext();)e.from().line===t.getCursor(!0).line&&e.from().ch===t.getCursor(!0).ch||o.marked.push(t.markText(e.from(),e.to(),{className:r}))})}}var n=2;CodeMirror.defineExtension("matchHighlight",function(e,n){t(this,e,n)})}();