Commit Graph

14 Commits

Author SHA1 Message Date
Darren Burns 59b1aca63b
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 <5621605+rodrigogiraoserrao@users.noreply.github.com>

* PR feedback

* Testing wrapping with trailing and leading whitespace

* Improve docstring wording

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-11-14 10:03:54 +00:00
Darren Burns c2f5ddbea7
Merge branch 'master' of github.com:Textualize/rich into benchmark 2022-03-10 17:10:27 +00:00
Darren Burns c80ad26d87
Add initial benchmark suite 2022-03-10 17:08:26 +00:00
Darren Burns 1a11ea3449 Conversion of Segments to legacy Windows API calls 2022-03-01 10:14:08 +00:00
Nathan Page fcf3ed6693 Set playground folder untracked
Allows for a dedicated area in the project to mess around with code.
2020-10-10 11:23:46 -04:00
Will McGugan e50a6be3c6 improved jupyter support 2020-05-30 11:38:47 +01:00
Will McGugan 82a11b9960 replace cwwidth 2020-03-15 15:45:45 +00:00
Will McGugan 3a950e8d43 changed highlighter to a bool 2020-01-16 16:25:10 +00:00
Will McGugan 356bdf8d2a typing fixes 2019-12-27 10:07:38 +00:00
Will McGugan 0d758dbf1e added docs 2019-12-26 17:20:46 +00:00
Will McGugan 155ee591c7 readme 2019-12-23 16:21:51 +00:00
Will McGugan a6db216788 functionality update 2019-11-15 21:47:29 +00:00
Will McGugan 7481db402b initial commit 2019-11-10 15:39:13 +00:00
Will McGugan 7a5d8184e8
Initial commit 2019-11-10 15:28:10 +00:00