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(barchart): fix(barchart): use width() instead of len() to get unicode string length #515

Merged
merged 1 commit into from Sep 20, 2023

Conversation

karthago1
Copy link
Contributor

@karthago1 karthago1 commented Sep 18, 2023

value_label.len() deliver byte length of the unicode strings, which are
not printed as a result.

use witdh() instead.

value_label.len() deliver byte length of the unicode strings, which are
not printed as a result.

use witdh() instead.

Signed-off-by: Ben Fekih, Hichem <hichem.f@live.de>
@karthago1 karthago1 changed the title fix(barchart): print value when value width equal bar width fix(barchart): fix(barchart): use width() instead of len() to get unicode string length Sep 19, 2023
@karthago1 karthago1 marked this pull request as ready for review September 19, 2023 19:13
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #515 (15f63ef) into main (dd9a8df) will increase coverage by 0.07%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #515      +/-   ##
==========================================
+ Coverage   89.93%   90.00%   +0.07%     
==========================================
  Files          41       40       -1     
  Lines       11334    11190     -144     
==========================================
- Hits        10193    10072     -121     
+ Misses       1141     1118      -23     
Files Changed Coverage Δ
src/widgets/barchart.rs 92.95% <100.00%> (+0.26%) ⬆️
src/widgets/barchart/bar.rs 98.86% <100.00%> (ø)

... and 5 files with indirect coverage changes

Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - we can merge this and work out the rest of the problem in #513 with small values.

@joshka joshka merged commit c9b8e7c into ratatui-org:main Sep 20, 2023
42 checks passed
@joshka
Copy link
Member

joshka commented Sep 20, 2023

I updated the commit message a bit to make it more Changelog friendly and merged this. Thanks for the PR @karthago1

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.

None yet

3 participants