ElyMark: a merge taken from disk leaves the tab saved (M-03)
Every path that takes the disk text as saved goes through adopt_disk, which sets the tab's mark and the view's baseline together; the merge branch no longer repeats it by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
42bbc4e8fb
commit
d5f94e6e7a
6 files changed
+17
-22
No files matched your search
@@ -112,20 +112,10 @@ impl Desk {
|
||||
if open > 0 {
|
||||
return log::error!("mark: a merge with {open} open conflicts");
|
||||
}
|
||||
let Some(tab) = self.tab_mut(id) else {
|
||||
return;
|
||||
};
|
||||
if let Err(error) = tab.session.reload_at(fingerprint) {
|
||||
let why = error.to_string();
|
||||
return self.set_outside(id, Outside::Unread(why), cx);
|
||||
// Disk text is saved; the merge edits it.
|
||||
if let Some(view) = self.adopt_disk(id, &disk, fingerprint, cx) {
|
||||
view.update(cx, |view, cx| view.adopt(merged, cx));
|
||||
}
|
||||
tab.extra.base = disk.text.clone();
|
||||
tab.mark = crate::engine::mark(&disk.text);
|
||||
tab.extra.restart_autosave();
|
||||
tab.doc.lock().expect("the text lock").source = disk;
|
||||
let view = tab.view.clone();
|
||||
view.update(cx, |view, cx| view.adopt(merged, cx));
|
||||
self.set_outside(id, Outside::Clear, cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user