Commit graph

11 commits

Author SHA1 Message Date
Will McGugan
60f3b615a7 changelog 2024-10-22 16:29:46 +01:00
Will McGugan
b93d3b6d98 test single cell widths 2024-10-22 16:13:14 +01:00
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
Andre Hora
767064c9ec improving tests in test_cells 2023-01-29 10:05:25 -03:00
Darren Burns
ffe9ae82f6
Supporting no stdout, tests 2022-09-07 15:26:05 +01:00
Darren Burns
009bf5e407
Revert "Fix width measurement of 353 emoji" 2022-01-17 15:02:04 +00:00
Darren Burns
45c1728cfd Ensure single digits dont appear in terminal cell with list 2022-01-13 15:11:56 +00:00
Will McGugan
07d51ffc1a race condition and tests 2021-11-27 19:41:29 +00:00
Will McGugan
3645de66c4 tests for 0 size 2021-11-13 09:07:42 +00:00
Will McGugan
8a74a97563 fix infinite loop 2021-11-13 09:04:12 +00:00
Will McGugan
a590002dc3 test set_cell_size 2020-04-26 15:48:04 +01:00