mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
0.3.3: fix off-by-1 in trimmed strings
This commit is contained in:
parent
96ff10c4b0
commit
2f561edeea
3 changed files with 16 additions and 16 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue