One function

_cell_len in Textualize/rich

The author described this change as fix test. It counts as a record because the check below fails on the code as it stood at 454fcfc92 and passes on 31930ddc8, with nothing else changed between the two runs.

Fix saved2026-02-01
Sharing licenceMIT · LICENSE
Change size+3 1

What the code was meant to do, written into the code itself as a docstring

Get the cell length of a string (length as it appears in the terminal). Args: text: String to measure. unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. Returns: Length of string in terminal cells.

The change

3232 while index < character_count:
3333 character = text[index]
3434 if character in SPECIAL:
35- if character == "\ufe0f" and last_measured_character:
35+ if character == "\u200d":
36+ index += 1
37+ elif character == "\ufe0f" and last_measured_character:
3638 total_width += last_measured_character in cell_table.narrow_to_wide
3739 last_measured_character = None
3840 else:

The check that tells the two apart

failpass·tests/test_cells.py::test_split_graphemes[\U0001f469\u200d\U0001f527-expected_spans5-2]

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 it454fcfc92c66556f9538d420b5bd3ba95b1f57b7
Broken version dated2026-02-01
Modulerich.cells
Units changed_cell_len
Fingerprint4a00fbf83a40d51c
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