Skip to content

Commit

Permalink
Make sure decorations that get merged or split get redrawn
Browse files Browse the repository at this point in the history
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
  • Loading branch information
marijnh committed Dec 9, 2024
1 parent 668e7d2 commit fe57aed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"sideEffects": false,
"license": "MIT",
"dependencies": {
"@codemirror/state": "^6.4.0",
"@codemirror/state": "^6.5.0",
"style-mod": "^4.1.0",
"w3c-keyname": "^2.2.4"
},
Expand Down
1 change: 1 addition & 0 deletions src/docview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ class DecorationComparator {
changes: number[] = []
compareRange(from: number, to: number) { addRange(from, to, this.changes) }
comparePoint(from: number, to: number) { addRange(from, to, this.changes) }
boundChange(pos: number) { addRange(pos, pos, this.changes) }
}

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

0 comments on commit fe57aed

Please sign in to comment.