documents: TableEdit::Delete removes the table at the caret
CI / platforms (windows-latest) (push) Failing after 9s
CI / site (push) Successful in 22s
CI / crate (push) Failing after 12m17s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

Typora's Paragraph > Table > Delete Table. It removes the table as the
block command does and refuses outside a table as TableRefusal::Outside.

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-14 17:04:26 -04:00
1 parent 6d90351423
commit 24ffc45c6b
4 files changed
+50 -7

No files matched your search

+3 -2
View File
@@ -50,8 +50,9 @@ impl MarkdownDocument {
) -> Result<(), EditRefusal> {
self.apart(
format!("table edit {edit:?}"),
move |full, selection| {
tables::edit_table(full, selection.start, edit).map_err(EditRefusal::Cells)
move |full, selection| match edit {
TableEdit::Delete => tables::delete(full, selection.start),
_ => tables::edit_table(full, selection.start, edit).map_err(EditRefusal::Cells),
},
cx,
)