Skip to content

Add support for OSC sequences #8

@bensadeh

Description

@bensadeh

Hi Michael,

First of all, I would like to say that I love this package. I am doing a lot of formatting with ANSI codes, and this package really takes a lot of the pain away from having to account for invisible codes. I am currently using other word-wrapping packages that do not account for the ANSI codes, and I'd like to migrate to go-term-text in full.

However, Wrap() currently hard breaks words at the word limit. This interferes with the ability to properly format hyperlinks in the terminal, because inserting a newline in the middle of the link messes up the output. I am attaching a screenshot to better explain the issue.

Screenshot 2020-09-26 at 14 41 37

The way I see it, the option not to break words that are longer than the line limit would solve the issue. Would it be possible to implement a wrap option to not break words that are longer than the line limit?

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