From 7eb8da1fa37890e7695b145392ed2fd00e51f737 Mon Sep 17 00:00:00 2001 From: amr Date: Tue, 23 Dec 2025 22:14:21 +0200 Subject: [PATCH] fix: only mark as saved after publishing if local path exists --- src/renderer/components/commands-action-button.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/commands-action-button.tsx b/src/renderer/components/commands-action-button.tsx index 4efc0d1974..27767169ce 100644 --- a/src/renderer/components/commands-action-button.tsx +++ b/src/renderer/components/commands-action-button.tsx @@ -175,10 +175,12 @@ export const GistActionButton = observer( try { const description = await this.getFiddleDescriptionFromUser(); - if (description) { if (await this.publishGist(description)) { - await this.props.appState.editorMosaic.markAsSaved(); + // Fix for #1821: Only mark as saved if we have a local path + if (appState.localPath) { + await this.props.appState.editorMosaic.markAsSaved(); + } } } } finally { @@ -214,8 +216,9 @@ export const GistActionButton = observer( files, }); - await appState.editorMosaic.markAsSaved(); - console.log('Updating: Updating done', { gist }); + if (appState.localPath) { + await appState.editorMosaic.markAsSaved(); + } console.log('Updating: Updating done', { gist }); if (!silent) { this.renderToast({