Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix display of special characters in finder popups
Previously len( desc ) and len( path ) counted bytes, which was wrong for non-ascii characters. A string like `čđš` should have the length of 3 when calculating the number of spaces between the identifier and the file path. That brings us to choosing the right string length function. The choices are: - strcharlen - counts grapheme clusters. `čđš` is 3, `čđ\tš` is 4. - strdisplaywidth - counts character width on screen. `čđš` is 3 and `čđ\tš` is 9 (assuming `tabstop` is 8). Tabs do not appear in identifier names, but double width emojis might? Tabs *can* appear in file names though. If there's more than one tab in the file name, using `strcharlen` will push the file path text off screen.
- Loading branch information