Fix picker item width overflow

Fixes #352
pull/345/head
Gokul Soumya 3 years ago committed by Blaž Hrastnik
parent 2924522aea
commit fb8e7dc25b

@ -293,7 +293,7 @@ impl<T: 'static> Component for Picker<T> {
inner.x + 3, inner.x + 3,
inner.y + 2 + i as u16, inner.y + 2 + i as u16,
(self.format_fn)(option), (self.format_fn)(option),
inner.width as usize - 1, (inner.width as usize).saturating_sub(3), // account for the " > "
if i == (self.cursor - offset) { if i == (self.cursor - offset) {
selected selected
} else { } else {

Loading…
Cancel
Save