Skip to content

Allow preventing trimming #599

@zemse

Description

@zemse

I just found out that the spaces at the end of line are trimmed and there is no way to customise that.

lines.push(Cow::from(line.trim_end_matches(' ')));

Basically I want to preserve all the characters. I want to render a wrapped text in a TUI, and based on user interaction, I will know the char index on the wrapped line and then I need to be able to reach the same char in the original string. Currently since the spaces are always trimmed, it's non-trivial to do that.

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