From 18beda38ac9dfec843dcbb51adf596e294fc13b2 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Thu, 24 Jun 2021 21:24:34 +0530 Subject: Add … when chars are truncated in picker --- helix-term/src/ui/picker.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 82543bc5..d1152659 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -289,7 +289,7 @@ impl Component for Picker { surface.set_string(inner.x + 1, inner.y + 2 + i as u16, ">", selected); } - surface.set_stringn( + surface.set_string_truncated( inner.x + 3, inner.y + 2 + i as u16, (self.format_fn)(option), @@ -299,6 +299,7 @@ impl Component for Picker { } else { style }, + true, ); } } -- cgit v1.2.3-70-g09d2