Panics · P21 Documents: stale block keys, cells and kinds change nothing; replaced text drops visual presses; nested images, versions and find hits hold

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 23:39:51 -04:00
1 parent 37c51874c8
commit 10788579c9
17 files changed
+565 -106

No files matched your search

+7 -2
View File
@@ -54,7 +54,9 @@ impl BlockEditor {
window: &mut Window,
cx: &mut Context<Self>,
) {
let ix = self.index(key);
let Some(ix) = self.index(key) else {
return;
};
let empty = self.blocks[ix]
.fields
.first()
@@ -216,7 +218,10 @@ impl Render for BlockEditor {
.on_mouse_down(
MouseButton::Left,
cx.listener(move |editor, _, window, cx| {
let end = editor.blocks[editor.index(key)]
let Some(ix) = editor.index(key) else {
return;
};
let end = editor.blocks[ix]
.fields
.first()
.map(|field| field.read(cx).text().len());