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
@@ -43,8 +43,11 @@ public sealed class EditorSessionTests
|
||||
var (session, source) = Open();
|
||||
await using (session)
|
||||
{
|
||||
Assert.False(session.HasPendingSave);
|
||||
for (var i = 1; i <= 20; i++) session.Edit(p => p with { Exposure = p.Exposure with { ExposureOffsetEv = i / 20.0 } }, "offset");
|
||||
Assert.True(session.HasPendingSave, "closing the window waits for this save");
|
||||
await session.FlushAsync();
|
||||
Assert.False(session.HasPendingSave);
|
||||
Assert.Equal(1, source.Saves);
|
||||
Assert.Equal(1.0, source.Stored.Exposure.ExposureOffsetEv);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user