documents: TableEdit::Delete removes the table at the caret
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:
1 parent
6d90351423
commit
24ffc45c6b
4 files changed
+50
-7
No files matched your search
@@ -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,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user