-
-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Due to the use of mattn/go-runewidth, the wrapping function is potentially faulty. This is because mattn/go-runewidth returns the uncollapsed length for strings containing combined emojis such as βππΌπ!β.
This has been known for a long time and was discussed here. If the renderer does not collapse the emojis, the length returned by mattn/go-runewidth would actually be correct. However, since this occurs very rarely in my opinion, the value normally returned is incorrect. This is not a direct bug, but it should definitely be a more prominently highlighted functionality due to the fact that it can lead to strange errors in a TUI that are not easy to pinpoint β if you don't know about this, you probably won't test the correctness of the returned length of a string as a early step.