A bug in word wrapping (with a failing test case)#452
A bug in word wrapping (with a failing test case)#452markusylisiurunen wants to merge 3 commits intocharmbracelet:masterfrom
Conversation
|
Continued to work on this a bit, I think I have found the location where this "double-wrapping" happens. In |
| w.addSpace() | ||
| w.addWord() | ||
| _, _ = w.buf.WriteRune(c) | ||
| w.lineLen++ |
There was a problem hiding this comment.
This single line was the fix, a PR is open here: muesli/reflow#77
Not sure how you feel about vendoring the wordwrap logic but the muesli/reflow repo seemed to not be active and waiting for a PR merged there may not be fun.
|
Any input on this @caarlos0 @aymanbagabas? |
|
|
Thank you, @markusylisiurunen, for taking a stab at this. However, currently we're focusing on the v2 branch along with the x/ansi and x/cellbuf packages which provide the word wrapping logic in v2. Please check out these package and whether the |
This is a failing test case related to #451. I tried to pinpoint the actual bug but could not find it (at least yet).