Repository navigation
Fix crash when boxing a table from the line above - #180
Merged
Merged
Conversation
With the cursor on the line above a table and no selection, the table-selection path that removes the formatted table copy was skipped. boxBlock then wrapped only the table copy (or one of its cells), leaving the original table outside the box and a stale copy without brl in the document, which crashed the text renderer with "No brl found". boxBlock now resolves the node to its owning original table and detaches the table copy before wrapping, matching the selection-based path.
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.
Problem
With the cursor on the line above a table and nothing selected, choosing
Styles > Miscellaneous > Boxes > Box crashes BrailleBlaster:
Cause
TableSelectionModuleonly marks a table as selected when there is arange selection, so with just a cursor
updateStyleskips the branch thatresolves the original table and detaches its formatted copy.
StylesMenuModule.boxBlockthen wraps only the table copy (or one of itscells), leaving the original table outside the box. On reformat, the
stale copy has no
brland the text renderer throws.Fix
boxBlocknow resolves the node to its owning original table anddetaches the table copy before wrapping, matching the selection-based
path. This also applies to Color Box. With the cursor inside a table cell
and nothing selected, Box now wraps the whole table instead of that cell.
Testing
brailleblaster-corecompiles.on the Windows dev machine, and the existing Box UI tests are disabled.
the line above it, and apply Styles > Miscellaneous > Boxes > Box. The
box should surround the whole table without a crash.