From 416720134424402d02f081e6f0e4e29bbc630e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Fri, 13 Aug 2021 18:00:04 +0900 Subject: [PATCH] ui: picker: Position count according to input bar --- helix-term/src/ui/picker.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 31aac794..08d80777 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -410,6 +410,8 @@ impl Component for Picker { // -- Render the input bar: + let area = Rect::new(inner.x + 1, inner.y, inner.width - 1, 1); + let count = format!("{}/{}", self.matches.len(), self.options.len()); surface.set_stringn( (area.x + area.width).saturating_sub(count.len() as u16 + 1), @@ -419,7 +421,6 @@ impl Component for Picker { text_style, ); - let area = Rect::new(inner.x + 1, inner.y, inner.width - 1, 1); self.prompt.render(area, surface, cx); // -- Separator