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

Wordwrap issues #40

Open
Rudi9719 opened this issue Nov 1, 2019 · 0 comments
Open

Wordwrap issues #40

Rudi9719 opened this issue Nov 1, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@Rudi9719
Copy link
Owner

Rudi9719 commented Nov 1, 2019

Describe the bug
Word wrap splitting words with newlines when displaying to chat and feed window

Expected behavior
A newline should be inserted in the message before the last space on a line causing the word that wouldn't fit to be printed on an entirely new line, repeated for each line.

Additional context
X size of a view can be found in gocui.Size() func
Traverse the string backwards from X.size, on first space found replace with \n
Traverse the string backwards from X.size * n? Might need better math but in essence replace the last space of every line with a newline char (and a space for the GUI users)

@Rudi9719 Rudi9719 added the bug Something isn't working label Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant