Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display of special characters in finder popups #4215

Merged
merged 1 commit into from
Jan 14, 2024

Commits on Jan 9, 2024

  1. 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.
    bstaletic committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    9dee4c4 View commit details
    Browse the repository at this point in the history