diff options
author | Gokul Soumya | 2021-06-24 15:54:34 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-25 00:28:24 +0000 |
commit | 18beda38ac9dfec843dcbb51adf596e294fc13b2 (patch) | |
tree | bd288a4201b8bda30e7869004f676dec2aebe36c /helix-term/src | |
parent | 10548bf0e32209e02460021cc8ca4865c4c75bf7 (diff) |
Add … when chars are truncated in picker
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/ui/picker.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<T: 'static> Component for Picker<T> { 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<T: 'static> Component for Picker<T> { } else { style }, + true, ); } } |