mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
Wrap setCursorHighlights in setTimeout (#12951)
GitOrigin-RevId: 204bf073bc2f4a014d9498c6a802fe38e52b22c5
This commit is contained in:
@@ -436,7 +436,9 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
if (cursorHighlights && currentDoc) {
|
||||
const items = cursorHighlights[currentDoc.doc_id]
|
||||
highlightsRef.current.cursorHighlights = items
|
||||
view.dispatch(setCursorHighlights(items))
|
||||
window.setTimeout(() => {
|
||||
view.dispatch(setCursorHighlights(items))
|
||||
})
|
||||
}
|
||||
}, [view, cursorHighlights, currentDoc])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user