on master help sign in
ui: picker: Position count according to input bar
4167201Blaž Hrastnik
helix-term/src/ui/picker.rs+2−1
@@ -410,6 +410,8 @@ impl<T: 'static> Component for Picker<T> {
410
410
411 // -- Render the input bar:
411 // -- Render the input bar:
412
412
413+ let area = Rect::new(inner.x + 1, inner.y, inner.width - 1, 1);
414+
413 let count = format!("{}/{}", self.matches.len(), self.options.len());
415 let count = format!("{}/{}", self.matches.len(), self.options.len());
414 surface.set_stringn(
416 surface.set_stringn(
415 (area.x + area.width).saturating_sub(count.len() as u16 + 1),
417 (area.x + area.width).saturating_sub(count.len() as u16 + 1),
@@ -419,7 +421,6 @@ impl<T: 'static> Component for Picker<T> {
419 text_style,
421 text_style,
420 );
422 );
421
423
422− let area = Rect::new(inner.x + 1, inner.y, inner.width - 1, 1);
423 self.prompt.render(area, surface, cx);
424 self.prompt.render(area, surface, cx);
424
425
425 // -- Separator
426 // -- Separator