diff --git a/main.js b/main.js index f90c257..9595a73 100644 --- a/main.js +++ b/main.js @@ -805,7 +805,8 @@ module.exports = class MarktilePlugin extends Plugin { this.app.workspace.onLayoutReady(() => this.app.workspace.getLeavesOfType('markdown').forEach((l) => this.injectMdButton(l))); } onunload() { - this.app.workspace.detachLeavesOfType(VIEW_TYPE); // Obsidian requirement: don't leave orphaned marktile views + // Per Obsidian plugin guidelines: do NOT detachLeavesOfType here — Obsidian reinitializes + // open leaves at their original position on update; detaching ourselves causes problems. (this._mdBtns || []).forEach(({ view, el }) => { if (el) el.remove(); if (view) delete view._mtBtn; }); // Remove the buttons we injected into native headers this._mdBtns = []; } diff --git a/manifest.json b/manifest.json index ba81564..3514612 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "marktile", "name": "marktile", - "version": "0.0.49", + "version": "0.0.50", "minAppVersion": "1.4.0", "description": "A Markdown editor where the markers never hide — headings grow while ## stays put. Pairs with tugtile. CJK-friendly.", "author": "CVER Inc.", diff --git a/versions.json b/versions.json index 04d71ba..f4c2a33 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,3 @@ { - "0.0.49": "1.4.0" + "0.0.50": "1.4.0" }