Repository navigation
Tables: Select All then Delete removes a table the document starts with; right-click Delete offers Delete Table again - #1202
Merged
echelon merged 2 commits intoOct 14, 2026
Conversation
…th; right-click Delete offers Delete Table again (fixes storytold#1198)
# Conflicts: # crates/engine/src/tests_typing.rs # docs/typing-parity.md # docs/ui-parity.md
Member
|
Thanks for the contribution, @marcoarnulfo! This has landed in main. If you haven't already, come join us on Discord: https://discord.gg/artcraft |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1198.
Two separate causes. Ctrl+A in a document that starts with a table puts the selection's start inside the table's first cell, and
delete_rangeonly dropped covered tables when the range began outside a table, so Delete/Backspace emptied the cells and left the table. It now handles the other direction too: a range from the very start of a top-level table to a top-level paragraph removes the covered tables and joins what's left. The right-click part is from #694 (284818b), which replaced the old Delete › Rows / Columns / Table submenu with one item that follows the selection, so with just the caret in a cell the menu only offered Delete Cells and there was no way to delete the table from it. Delete is a submenu again (Cells, Columns, Rows, Table), like the Delete button Word shows on right-click; the rest of #694's selection-dependent items are unchanged. Happy to switch to showing only Delete Table next to the selection's own item if you'd rather keep the menu shorter.Validation:
tests_typing::select_all_then_delete_removes_tables: fails on main (the table at the document start survives,left: 1, right: 0), passes herecanvas::tests::a_right_click_in_a_cell_deletes_the_table: fails on main (no Delete Table in the menu with the caret in a cell), passes here; the two existing context-menu tests are updated for the submenucargo clippy -p wordcraft-doc -p wordcraft-engine -p wordcraft-ui-egui --all-targets -- -D warnings,cargo fmt --all -- --check