fix(widgets): table row selection shows full background color#120
Merged
mathiasbourgoin merged 1 commit intomainfrom Feb 23, 2026
Merged
fix(widgets): table row selection shows full background color#120mathiasbourgoin merged 1 commit intomainfrom
mathiasbourgoin merged 1 commit intomainfrom
Conversation
605cbff to
01c62b2
Compare
mathiasbourgoin
approved these changes
Feb 23, 2026
01c62b2 to
0bde150
Compare
When selection_mode = Row, the entire row should display the selection background color. Previously, only the vertical border characters (│) showed the selection color because: 1. assemble_columns() applied themed_border to each vline separator 2. Each themed_border adds ANSI codes with \033[0m reset suffix 3. themed_selection wraps the assembled row, but reset codes inside clear the selection background 4. Result: only vlines show selection; cell content loses background Fix: Pass ~is_selected flag to assemble_columns. When true, vlines are rendered without themed_border styling, allowing them to inherit the selection background applied to the full row. This affects both wrapped and non-wrapped table rendering paths. BREAKING CHANGE: Bumps version to 0.4.1 for bug fix release.
0bde150 to
19e7361
Compare
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.
Summary
Fixes table row selection highlighting to display full background color across the entire row when
selection_mode = Row.Problem
When navigating through a table with row selection enabled, only the vertical border characters (
│) between columns displayed the selection background color. The cell contents remained unstyled, making it difficult to see which row was selected.Root cause: Each border character was styled with
themed_border, which adds ANSI codes ending with\033[0m(reset all formatting). Whenthemed_selectionwrapped the entire assembled row, these reset codes cleared the selection background for all content between borders.Solution
~is_selectedflag toassemble_columns()functionis_selected = true, render border characters as plain text (nothemed_border)Testing
You can test the fix with the table demo:
```bash
cd path/to/miaou
dune exec example/demos/table/main.exe
```
Use Up/Down arrows to navigate between rows. You should see the entire selected row with a colored background, not just the vertical separators.
dune runtest)dune build)Version Bump
Checklist