BlockEditor selects across blocks: drag or Shift-press, then type, paste, delete, cut, copy as Markdown or break, one undo step (#7)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-08 21:47:08 -04:00
1 parent f5eb82ee1b
commit d24984cc38
12 files changed
+797 -10

No files matched your search

+2
View File
@@ -76,6 +76,7 @@ impl BlockEditor {
}
pub(crate) fn undo(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.clear_span(window, cx);
self.settle(true, cx);
if let Some(previous) = self.history.undo(self.now(cx)) {
log::info!("block editor: undo");
@@ -84,6 +85,7 @@ impl BlockEditor {
}
pub(crate) fn redo(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.clear_span(window, cx);
if let Some(next) = self.history.redo(self.now(cx)) {
log::info!("block editor: redo");
self.restore(next, window, cx);