You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix double-width characters disappearing when wrapping (#3180)
* Update docstring for `Text.wrap`s width parameter to indicate that it's referring to the number of *single-width* characters.
Also a small addition to the gitignore file.
* Working on double width wrapping fixes
* Chop cells to fit to width
* Fix folding when theres already text on line
* Update wrapping logic to fix issues with CJK charcters disappearing when the "fold" location sat *within* a double-width character. Ensure we retain browser logic of: if there is no space on the current line, move to a new line, and if theres not enough space on the entire new line, fold the text over multiple lines at appropriate locations.
* Remove old TODO comments
* Add regression test note
* Rename function to avoid breaking change
* Update CHANGELOG
* Remove old comment that is no longer relevant
* Cover off some wrapping edge cases
* Adding docstrings to tests explaining their purpose
* Renaming a local, function scope function alias
* Update rich/_wrap.py
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
* PR feedback
* Testing wrapping with trailing and leading whitespace
* Improve docstring wording
---------
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
0 commit comments