Skip to content

player: marquee scrolling splits on chars rather than grapheme clusters #18

@SuaveIV

Description

@SuaveIV

Noted during review of #16, deferred as out of scope.

The marquee scrolling logic in render_progress iterates with .chars(), which can split grapheme clusters. If a header contains combining characters (e.g. e + combining accent rather than the precomposed é), the scroll can strand a combining character at the left edge of the visible window, producing a stray accent glyph.

In practice this is rare — most music taggers write precomposed Unicode — but it is a real edge case for internationalized metadata.

The fix is to add the unicode-segmentation crate and replace .chars() with .graphemes(true) in the marquee slicer and in the cycle_len calculation. The marquee_needed check via unicode_width is already correct and would not need to change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions