fix(app): store the editor's last edit before the main window closes
The project is saved a moment after each change; closing the window during that moment now waits for the save (once per window, also when another section is showing). EditorSession.HasPendingSave reports it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
5 files changed
+47
-1
No files matched your search
@@ -64,6 +64,9 @@ public sealed class EditorSession : IAsyncDisposable
|
||||
|
||||
public ProjectSettings Project => History.Current;
|
||||
|
||||
/// <summary>A change is waiting for its save or being saved.</summary>
|
||||
public bool HasPendingSave => _saver.HasPendingChanges;
|
||||
|
||||
/// <summary>Applies <paramref name="change"/> as an undoable step; false when it changes nothing.</summary>
|
||||
/// <param name="mergeKey">Consecutive edits with the same key are one undo step (a slider drag).</param>
|
||||
public bool Edit(Func<ProjectSettings, ProjectSettings> change, string? mergeKey = null)
|
||||
|
||||
Reference in new issue
Block a user