diff options
author | Gokul Soumya | 2021-06-23 15:08:08 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-24 03:00:08 +0000 |
commit | fb8e7dc25bbead56e012356c1f5f29162d0c9a17 (patch) | |
tree | 129005773c8867f5606f12290b03e2fcc4ce2752 /helix-term/src/ui | |
parent | 2924522aea8310cd2a06cc124c0d5b9e2a2de9b4 (diff) |
Fix picker item width overflow
Fixes #352
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/picker.rs | 2 |
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 { |