From 76503fb86a8b8a6b5c3ce1be87c15a55af38508d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 16 Feb 2025 07:25:25 +0100 Subject: term: append zero-width grapheme breaking characters to previous cell When compiled with grapheme clustering support, zero-width characters that also are grapheme breaks, were ignored (not stored in the grid). When utf8proc says the character is a grapheme break, we try to print the character to the current cell. But this is only done when width > 0. As a result, zero width grapheme breaks were simply discarded. This only happens when grapheme clustering is enabled; when disabled, all zero width characters are appended. Fix this by also requiring the width to be non-zero when if we should append the character or not. Closes #1960 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a090062..7cc5e13f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,11 +112,15 @@ enabled ([#1947][1947]). * Reflow of the cursor (active + saved) when at the end of the line with a pending wrap (LCF set) ([#1954][1954]). +* Zero-width characters that also are grapheme breaks (e.g. U+200B, + ZERO WIDTH SPACE) being ignored (discarded and never stored in the + grid) ([#1960][1960]). [1918]: https://codeberg.org/dnkl/foot/issues/1918 [1929]: https://codeberg.org/dnkl/foot/issues/1929 [1947]: https://codeberg.org/dnkl/foot/issues/1947 [1954]: https://codeberg.org/dnkl/foot/issues/1954 +[1960]: https://codeberg.org/dnkl/foot/issues/1960 ### Security -- cgit v1.3