mirror of
https://github.com/silvanocerza/github-gitless-sync.git
synced 2026-07-22 12:10:28 +00:00
Fix highlight not getting updated when switching files
This commit is contained in:
parent
72a7a7ed62
commit
d5eec99546
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue