One function
get_character_cell_size in Textualize/rich
The author described this change as “fix fonts”. It counts as a record because the check below fails on the code as it stood at 36fe3f7ca and passes on 73ee8232e, with nothing else changed between the two runs.
ProjectTextualize/rich
Fix saved2026-01-24
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Get the cell size of a character. Args: character (str): A single character. unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. Returns: int: Number of cells (0, 1 or 2) occupied by that character.
The change
| 11 | 11 | codepoint = ord(character) | |
| 12 | 12 | table = load_cell_table(unicode_version).widths | |
| 13 | 13 | if codepoint > table[-1][1]: | |
| 14 | - | return 0 | |
| 14 | + | return 1 | |
| 15 | 15 | lower_bound = 0 | |
| 16 | 16 | upper_bound = len(table) - 1 | |
| 17 | 17 | index = (lower_bound + upper_bound) // 2 |
The check that tells the two apart
fail→pass·tests/test_cells.py::test_nerd_font
Check file tests/test_cells.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it36fe3f7ca9becca4777861d5e6e625f5a4a37545
Broken version dated2026-01-24
Modulerich.cells
Units changedget_character_cell_size
Fingerprint2109f7e000c4e044
Checked2026-08-17 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in Textualize/rich
- 2026-04-12TableDataElement
- 2026-02-01_cell_len
- 2025-11-13Fix raw markup printed on prompt errors sometimes
- 2025-05-01fix(panel): fix title missing panel background
- 2024-10-03fix(table): highlight columns added by add_row
- 2023-01-06fix issue splitting segments