on master help sign in
Fix picker item width overflow

Fixes #352

commitfb8e7dc25bbead56e012356c1f5f29162d0c9a17 authorGokul Soumya <gokulps15@gmail.com> dateWed 23 Jun 2021, 20:38 (5 years ago) parent2924522
1 file changed+1−1
helix-term/src/ui/picker.rs+1−1
helix-term/src/ui/picker.rs+1−1
@@ -293,7 +293,7 @@ impl<T: 'static> Component for Picker<T> {
293293 inner.x + 3,
294294 inner.y + 2 + i as u16,
295295 (self.format_fn)(option),
296− inner.width as usize - 1,
296+ (inner.width as usize).saturating_sub(3), // account for the " > "
297297 if i == (self.cursor - offset) {
298298 selected
299299 } else {