correctly clear gutter marks for sublime bookmarks
This commit is contained in:
parent
31558d5071
commit
635fc705f9
|
@ -172,8 +172,9 @@
|
||||||
elBookmark.textContent = '\u00A0';
|
elBookmark.textContent = '\u00A0';
|
||||||
const clearMarker = function () {
|
const clearMarker = function () {
|
||||||
const line = this.lines[0];
|
const line = this.lines[0];
|
||||||
CodeMirror.TextMarker.prototype.clear.apply(this);
|
delete this.clear; // removing our patch from the instance...
|
||||||
if (!line.markedSpans.some(span => span.marker.sublimeBookmark)) {
|
this.clear(); // ...and using the original prototype
|
||||||
|
if (!(line.markedSpans || []).some(span => span.marker.sublimeBookmark)) {
|
||||||
this.doc.setGutterMarker(line, CM_BOOKMARK_GUTTER, null);
|
this.doc.setGutterMarker(line, CM_BOOKMARK_GUTTER, null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user