diff --git a/manifest.json b/manifest.json index b336e3e..77ccd51 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "supercharged-links-obsidian", "name": "Supercharged Links", - "version": "0.12.0", + "version": "0.12.1", "minAppVersion": "1.5.11", "description": "Add properties and menu options to links and style them!", "author": "mdelobelle & Emile", diff --git a/src/linkAttributes/livePreview.ts b/src/linkAttributes/livePreview.ts index bbca66e..4f117c7 100644 --- a/src/linkAttributes/livePreview.ts +++ b/src/linkAttributes/livePreview.ts @@ -58,7 +58,7 @@ export function buildCMViewPlugin(app: App, _settings: SuperchargedLinksSettings } update(update: ViewUpdate) { - if (update.viewportChanged || update.docChanged) { + if (update.docChanged) { this.decorations = this.decorations.map(update.changes); update.changes.iterChanges((fromA, toA, fromB, toB, t) => { @@ -72,9 +72,11 @@ export function buildCMViewPlugin(app: App, _settings: SuperchargedLinksSettings // Update decorations within bounds this.decorations = RangeSet.join([this.decorations, this.buildDecorations(update.view, minFrom, maxTo)]); - }); } + else if (update.viewportChanged) { + this.decorations = this.buildDecorations(update.view); + } } destroy() {