mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 21:47:07 +04:00
ui: picker: Position count according to input bar
This commit is contained in:
parent
eb9ac0a743
commit
4167201344
@ -410,6 +410,8 @@ fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
|
|||||||
|
|
||||||
// -- Render the input bar:
|
// -- 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());
|
let count = format!("{}/{}", self.matches.len(), self.options.len());
|
||||||
surface.set_stringn(
|
surface.set_stringn(
|
||||||
(area.x + area.width).saturating_sub(count.len() as u16 + 1),
|
(area.x + area.width).saturating_sub(count.len() as u16 + 1),
|
||||||
@ -419,7 +421,6 @@ fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
|
|||||||
text_style,
|
text_style,
|
||||||
);
|
);
|
||||||
|
|
||||||
let area = Rect::new(inner.x + 1, inner.y, inner.width - 1, 1);
|
|
||||||
self.prompt.render(area, surface, cx);
|
self.prompt.render(area, surface, cx);
|
||||||
|
|
||||||
// -- Separator
|
// -- Separator
|
||||||
|
Loading…
Reference in New Issue
Block a user