diff --git a/components/Settings.ts b/components/Settings.ts index f95d193..74c2893 100644 --- a/components/Settings.ts +++ b/components/Settings.ts @@ -41,7 +41,7 @@ export default class RedirectSettingsTab extends PluginSettingTab { }); new Setting(containerEl) - .setName("Delete the _forwards Folder") + .setName("Delete the _forwards folder") .setDesc( "Before uninstalling the plugin, manually delete the `_forwards` folder to remove unnecessary files. This cannot be undone." ) diff --git a/main.ts b/main.ts index bfae939..e161d1a 100644 --- a/main.ts +++ b/main.ts @@ -137,7 +137,9 @@ export default class RedirectPlugin extends Plugin { this.app.workspace.on("file-open", this.redirectRef); } - await this.deleteNote(redirectingNote); + setTimeout(async () => { + await this.deleteNote(redirectingNote); + }, 500); } catch (error) { console.error(error); } @@ -169,7 +171,7 @@ export default class RedirectPlugin extends Plugin { this.addCommand({ id: "paste-redirect-syntax", - name: "Paste Redirect Syntax onto Selection", + name: "Paste redirect syntax onto selection", editorCallback: (editor, view) => { const selection = editor.getSelection(); editor.replaceSelection(`::>[[${selection}]]`);