mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
[cm6] fix spell check issue, use new document range (#13035)
GitOrigin-RevId: 01b642dc867705c5de828fce439f424d7816d175
This commit is contained in:
committed by
Copybot
parent
3e17c4cb50
commit
75cf5c5583
+3
-3
@@ -55,12 +55,12 @@ const removeMarksUnderEdit = (
|
||||
marks: DecorationSet,
|
||||
transaction: Transaction
|
||||
) => {
|
||||
transaction.changes.iterChanges((fromA, toA) => {
|
||||
transaction.changes.iterChanges((fromA, toA, fromB, toB) => {
|
||||
marks = marks.update({
|
||||
// Filter out marks that overlap the change span
|
||||
filter: (from, to, mark) => {
|
||||
const changeStartWithinMark = from <= fromA && to >= fromA
|
||||
const changeEndWithinMark = from <= toA && to >= toA
|
||||
const changeStartWithinMark = from <= fromB && to >= fromB
|
||||
const changeEndWithinMark = from <= toB && to >= toB
|
||||
const markHasBeenEdited = changeStartWithinMark || changeEndWithinMark
|
||||
return !markHasBeenEdited
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user