Never lose work: atomic saves (temporary file, flush, rename) keeping the replaced version as <file>.bak; autosave of unsaved changes into a recovery folder (every 5 min, preference autosave_minutes, and after commands over 1.5 s; skipped when unchanged; entries locked while their app runs); Recover unsaved design? at launch; doc.recovery_list / doc.recover / doc.recovery_discard; kill-mid-save test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
01b349842c
commit
f40356a74f
11 files changed
+679
-1
No files matched your search
@@ -10,6 +10,7 @@
|
||||
|
||||
pub mod cmd;
|
||||
pub mod params;
|
||||
pub mod recovery;
|
||||
pub mod sample;
|
||||
pub mod view;
|
||||
|
||||
@@ -224,6 +225,10 @@ impl Session {
|
||||
pub fn mark_saved(&mut self) {
|
||||
self.saved = self.doc.clone();
|
||||
}
|
||||
/// The design has changes not in its file (a recovered design).
|
||||
pub fn mark_unsaved(&mut self) {
|
||||
self.saved = Arc::new(Document::new(""));
|
||||
}
|
||||
|
||||
pub fn echo(&mut self, s: impl Into<String>) {
|
||||
self.log.push(s.into());
|
||||
|
||||
Reference in new issue
Block a user