From 5b42055839dad97b8f7539bc802edabcb0de87a9 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 31 May 2020 23:04:49 +0300 Subject: [PATCH] remove redundant setGutterMarker optimization --- edit/codemirror-default.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/edit/codemirror-default.js b/edit/codemirror-default.js index 3f8afc6d..dac26c77 100644 --- a/edit/codemirror-default.js +++ b/edit/codemirror-default.js @@ -242,23 +242,6 @@ CodeMirror.commands[name] = (...args) => editor[name](...args); } - // speedup: reuse the old folding marks - // TODO: remove when https://github.com/codemirror/CodeMirror/pull/6010 is shipped in /vendor - const {setGutterMarker} = CodeMirror.prototype; - CodeMirror.prototype.setGutterMarker = function (line, gutterID, value) { - const o = this.state.foldGutter.options; - if (typeof o.indicatorOpen === 'string' || - typeof o.indicatorFolded === 'string') { - const old = line.gutterMarkers && line.gutterMarkers[gutterID]; - // old className can contain other names set by CodeMirror so we'll use classList - if (old && value && old.classList.contains(value.className) || - !old && !value) { - return line; - } - } - return setGutterMarker.apply(this, arguments); - }; - // CodeMirror convenience commands Object.assign(CodeMirror.commands, { toggleEditorFocus,