M3.9: a browser session restored with unsaved changes stays modified
The web app reopens the last visit's project and, when it had unsaved changes, marked it modified with `bump()`. Since M3.9 the modified mark follows the saved snapshot, and a bump on the very project just opened counts as "back at the saved state", so restored changes looked saved (no `*`, no unsaved-changes prompt). `Session::mark_unsaved` forgets the saved snapshot instead: the project stays modified until saved, whatever is undone. Regression test included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b21e04b301
commit
a12d4ae1fa
@@ -167,7 +167,7 @@ pub fn restore(s: &mut Session) -> bool {
|
||||
}
|
||||
if meta.dirty {
|
||||
// Unsaved changes stay unsaved.
|
||||
s.bump();
|
||||
s.mark_unsaved();
|
||||
}
|
||||
SNAP.with(|c| c.set((s.revision, 0.0)));
|
||||
log::info!("restored the last session ({})", meta.path.as_deref().unwrap_or("untitled"));
|
||||
|
||||
Reference in New Issue
Block a user