diff --git a/src/views/conflicts-resolution/diff-highlight-plugin.ts b/src/views/conflicts-resolution/diff-highlight-plugin.ts index e22fab4..9758f9e 100644 --- a/src/views/conflicts-resolution/diff-highlight-plugin.ts +++ b/src/views/conflicts-resolution/diff-highlight-plugin.ts @@ -21,6 +21,12 @@ export function createDiffHighlightPlugin(spec: DiffHighlightPluginSpec) { this.decorations = this.buildDecorations(view); } + update(update: ViewUpdate) { + if (update.docChanged) { + this.decorations = this.buildDecorations(update.view); + } + } + buildDecorations(view: EditorView): DecorationSet { const decorations = []; const doc = view.state.doc;