url-mode: handle wide chars and grapheme clusters when auto-detecting URLs

* Skip spacer cells. This fixes an issue where characters following a
  double-width character weren't detect properly.

* Unpack grapheme clusters (i.e. cells with multiple codepoints), and
  iterate all their codepoints.

Closes #1465
This commit is contained in:
Daniel Eklöf 2023-08-21 16:26:18 +02:00
parent 482a032d1a
commit 4f3f614457
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 118 additions and 90 deletions

View file

@ -76,9 +76,12 @@
([#1436][1436]).
* One frame being rendered at the wrong scale after being hidden by
another opaque, maximized window ([#1464][1464]).
* Double-width characters, and grapheme clusters breaking URL
auto-detection ([#1465][1465]).
[1436]: https://codeberg.org/dnkl/foot/issues/1436
[1464]: https://codeberg.org/dnkl/foot/issues/1464
[1465]: https://codeberg.org/dnkl/foot/issues/1465
### Security