0.3.3: fix off-by-1 in trimmed strings

This commit is contained in:
🪞👃🪞 2025-03-23 21:23:08 +02:00
parent 96ff10c4b0
commit 2f561edeea
3 changed files with 16 additions and 16 deletions

View file

@ -32,7 +32,7 @@ impl<T: AsRef<str>> Content<TuiOut> for TrimStringRef<'_, T> {
}
fn render (&self, target: &mut TuiOut) {
let area = target.area();
let mut width: u16 = 0;
let mut width: u16 = 1;
let mut chars = self.1.as_ref().chars();
while let Some(c) = chars.next() {
if width > self.0 || width > area.w() {