From de99f3a37c32e32b4ce152cadbe055a5ea6f2ca0 Mon Sep 17 00:00:00 2001 From: Kodai Nakamura Date: Wed, 28 May 2025 00:27:59 +0900 Subject: [PATCH] chore: use save to check if we should show the command in command palette --- src/main.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 564f255..8f4d2eb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -434,13 +434,15 @@ export default class AutomaticLinkerPlugin extends Plugin { return; } - if (!checking) { + if (checking) { + return save(checking); + } else { const currentCuror = cm.getCursor(); safeWrite("save", async () => { - await throttledFormatOnSave(); + await save(checking); }); safeWrite("save", async () => { - await save?.(); + await throttledFormatOnSave(); }); cm.setCursor({ line: currentCuror.line,