Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(line): line truncation respects alignment #987

Merged
merged 9 commits into from Mar 31, 2024

Conversation

TadoTheMiner
Copy link
Contributor

@TadoTheMiner TadoTheMiner commented Mar 18, 2024

When rendering a Line, the line will be truncated:

  • on the right for left aligned lines
  • on the left for right aligned lines
  • on bot sides for centered lines

E.g. "Hello World" will be rendered as "Hello", "World", "lo wo" for
left, right, centered lines respectively.

Fixes: #932

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 89.4%. Comparing base (26af650) to head (71ec798).

Files Patch % Lines
src/text/line.rs 96.1% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #987   +/-   ##
=====================================
  Coverage   89.4%   89.4%           
=====================================
  Files         61      61           
  Lines      15359   15430   +71     
=====================================
+ Hits       13731   13799   +68     
- Misses      1628    1631    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TadoTheMiner TadoTheMiner changed the title fix(line): line truncation now respects alignment Line truncation now respects alignment Mar 18, 2024
@TadoTheMiner TadoTheMiner changed the title Line truncation now respects alignment fix(line): line truncation now respects alignment Mar 18, 2024
@TadoTheMiner TadoTheMiner changed the title fix(line): line truncation now respects alignment fix(line): line truncation respects alignment Mar 19, 2024
src/text/line.rs Show resolved Hide resolved
src/text/line.rs Outdated Show resolved Hide resolved
src/text/line.rs Outdated Show resolved Hide resolved
@joshka joshka mentioned this pull request Mar 24, 2024
src/text/line.rs Outdated Show resolved Hide resolved
@joshka joshka merged commit 0207160 into ratatui-org:main Mar 31, 2024
36 checks passed
@joshka
Copy link
Member

joshka commented Mar 31, 2024

Merged - thanks for the effort in this PR!

@TadoTheMiner
Copy link
Contributor Author

Merged - thanks for the effort in this PR!

You're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line truncation should respect alignment
4 participants