Documents: open cells keep presses; finds open their cell
CI / platforms (windows-latest) (push) Failing after 9s
CI / site (push) Successful in 23s
CI / crate (push) Failing after 13m33s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

A press inside the open cell stays with its field. Find opens the
cell holding a match. A closing backslash no longer escapes the
next pipe. A right press after typed pipes reads the right byte.

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-15 01:16:08 -04:00
1 parent 5dc4dd1805
commit 6a3f3486fd
9 files changed
+233 -39

No files matched your search

+3 -3
View File
@@ -132,9 +132,9 @@ impl MarkdownDocument {
// A cell reads as it writes back.
let typed = match open.cell {
Some(_) => {
let shift = |at: usize| cells::guarded(&typed[..at]).len();
let shift = |at: usize| cells::kept_at(typed, at);
picked = shift(picked.start)..shift(picked.end);
cells::guarded(typed)
cells::kept(typed)
}
None => typed.to_string(),
};
@@ -156,7 +156,7 @@ impl MarkdownDocument {
if let Some(open) = &self.open {
let typed = open.input.read(cx).text();
// Offsets read the escaped cell; its field holds it raw.
let raw = open.cell.is_some() && cells::guarded(typed) != typed;
let raw = open.cell.is_some() && cells::kept(typed) != typed;
let end = offset + typed.len();
let grown = (edits.iter().map(|(_, with)| with.len()).sum::<usize>() + end)
.checked_sub(edits.iter().map(|(range, _)| range.len()).sum::<usize>());