correctly clear gutter marks for sublime bookmarks

This commit is contained in:
tophf 2020-11-04 17:41:11 +03:00
parent 31558d5071
commit 635fc705f9

View File

@ -172,8 +172,9 @@
elBookmark.textContent = '\u00A0';
const clearMarker = function () {
const line = this.lines[0];
CodeMirror.TextMarker.prototype.clear.apply(this);
if (!line.markedSpans.some(span => span.marker.sublimeBookmark)) {
delete this.clear; // removing our patch from the instance...
this.clear(); // ...and using the original prototype
if (!(line.markedSpans || []).some(span => span.marker.sublimeBookmark)) {
this.doc.setGutterMarker(line, CM_BOOKMARK_GUTTER, null);
}
};