From fb8e7dc25bbead56e012356c1f5f29162d0c9a17 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Wed, 23 Jun 2021 20:38:08 +0530 Subject: Fix picker item width overflow Fixes #352 --- helix-term/src/ui/picker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term') 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 Component for Picker { 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 { -- cgit v1.2.3-70-g09d2