aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGokul Soumya2021-06-23 15:08:08 +0000
committerBlaž Hrastnik2021-06-24 03:00:08 +0000
commitfb8e7dc25bbead56e012356c1f5f29162d0c9a17 (patch)
tree129005773c8867f5606f12290b03e2fcc4ce2752
parent2924522aea8310cd2a06cc124c0d5b9e2a2de9b4 (diff)
Fix picker item width overflow
Fixes #352
-rw-r--r--helix-term/src/ui/picker.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index 722ad9ca..82543bc5 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -293,7 +293,7 @@ impl<T: 'static> Component for Picker<T> {
inner.x + 3,
inner.y + 2 + i as u16,
(self.format_fn)(option),
- inner.width as usize - 1,
+ (inner.width as usize).saturating_sub(3), // account for the " > "
if i == (self.cursor - offset) {
selected
} else {