C14.9 r1: tables keep extra cells and quote marks; preview refuses edits; lists only in list items; replace moves past its text (library edc328a)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-12 06:43:23 -04:00
1 parent d4a7d3ebd7
commit 2aa4a080bb
9 files changed
+120 -23

No files matched your search

+20 -9
View File
@@ -140,17 +140,28 @@ impl Desk {
if edits.is_empty() {
return;
}
// The next match starts past the replaced text.
let after = edits[0].0.start + edits[0].1.len();
let document = view.read(cx).document().clone();
document.update(cx, |document, cx| document.replace(edits, cx));
self.count(cx);
// The next match takes the replaced one's place.
let next = self
.finding
.as_ref()
.and_then(|find| find.current.and_then(|at| find.hits.get(at)).cloned());
if let Some(range) = next.filter(|_| !every) {
document.update(cx, |document, cx| document.show_match(range, window, cx));
if !document.update(cx, |document, cx| document.replace(edits, cx)) {
let said = text(cx, "mark.preview.read_only", &[]);
return self.toast(said, Severity::Info, cx);
}
self.count(cx);
if every {
return;
}
let Some(find) = self.finding.as_mut() else {
return;
};
let next = find.hits.iter().position(|hit| hit.start >= after);
find.current = next.or((!find.hits.is_empty()).then_some(0));
let Some(range) = find.current.map(|at| find.hits[at].clone()) else {
return;
};
let hits = find.hits.clone();
mark(&document, &hits, find.current, cx);
document.update(cx, |document, cx| document.show_match(range, window, cx));
}
fn close_find(&mut self, window: &mut Window, cx: &mut Context<Self>) {