mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-26 22:50:47 +00:00
Fix text width measure in Text widget
This commit is contained in:
parent
93cc237007
commit
19a9cf8239
1 changed files with 1 additions and 8 deletions
|
@ -193,14 +193,7 @@ impl<'a> Widget for Text<'a> {
|
|||
s,
|
||||
c,
|
||||
self.background_color);
|
||||
x += 1;
|
||||
}
|
||||
|
||||
for &(x, y, width, fg, bg) in self.colors {
|
||||
for i in 0..width {
|
||||
buf.set_fg(x + i, y + text_area.top(), fg);
|
||||
buf.set_bg(x + i, y + text_area.top(), bg);
|
||||
}
|
||||
x += s.width() as u16;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue