Skip to content

Commit fe57aed

Browse files
committed
Make sure decorations that get merged or split get redrawn
FIX: Fix an issue where mark decorations that got merged or split weren't properly redrawn. See https://discuss.codemirror.net/t/codemirror6-selection-match-not-merge-when-the-selection-is-repeated-characters/8871
1 parent 668e7d2 commit fe57aed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"sideEffects": false,
2727
"license": "MIT",
2828
"dependencies": {
29-
"@codemirror/state": "^6.4.0",
29+
"@codemirror/state": "^6.5.0",
3030
"style-mod": "^4.1.0",
3131
"w3c-keyname": "^2.2.4"
3232
},

src/docview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ class DecorationComparator {
644644
changes: number[] = []
645645
compareRange(from: number, to: number) { addRange(from, to, this.changes) }
646646
comparePoint(from: number, to: number) { addRange(from, to, this.changes) }
647+
boundChange(pos: number) { addRange(pos, pos, this.changes) }
647648
}
648649

649650
function findChangedDeco(a: readonly DecorationSet[], b: readonly DecorationSet[], diff: ChangeSet) {

0 commit comments

Comments
 (0)