natecraddock / zf

a commandline fuzzy finder and zig package designed for filtering filepaths
MIT License
451 stars 14 forks source link

Grapheme ZWJ clusters in query #19

Closed natecraddock closed 1 year ago

natecraddock commented 1 year ago

When there are grapheme clusters in the query, the query width is incorrectly calculated and is wrapped to the next line. Editing still works however.

> 🐻‍❄️                                             1
/5[garbled unicode here]
natecraddock commented 1 year ago

This seems to be an upstream issue in ziglyph. The string 🐻‍❄️🐻‍❄️ is only counted as having a length of 1 (it is counted as a single grapheme)

natecraddock commented 1 year ago

Reported upstream https://github.com/jecolon/ziglyph/issues/20

natecraddock commented 1 year ago

This is resolved upstream now! The width calculation is still incorrect