diff options
author | Blaž Hrastnik | 2021-06-01 03:00:25 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-01 03:00:25 +0000 |
commit | a2147fc7d56f9f5cb614d8c80b154a545dd59f00 (patch) | |
tree | ef6f57872d2981fe6f554a367b4a8fb6dbd32cd5 /helix-term/src/ui/prompt.rs | |
parent | d8e16554bf0478e30853e8950132a2d17dba5a17 (diff) |
Change help prompt styling
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index e6c383b6..8bb6ba93 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -111,6 +111,7 @@ impl Prompt { pub fn render_prompt(&self, area: Rect, surface: &mut Surface, cx: &mut Context) { let theme = &cx.editor.theme; let text_color = theme.get("ui.text.focus"); + let selected_color = theme.get("ui.menu.selected"); // completion let max_col = area.width / BASE_WIDTH; @@ -133,7 +134,8 @@ impl Prompt { for (i, (_range, completion)) in self.completion.iter().enumerate() { let color = if Some(i) == self.selection { - Style::default().bg(Color::Rgb(104, 60, 232)) + // Style::default().bg(Color::Rgb(104, 60, 232)) + selected_color // TODO: just invert bg } else { text_color }; @@ -158,14 +160,9 @@ impl Prompt { if let Some(doc) = (self.doc_fn)(&self.line) { let text = ui::Text::new(doc.to_string()); - let area = Rect::new( - completion_area.x, - completion_area.y - 3, - completion_area.width, - 3, - ); + let area = Rect::new(completion_area.x, completion_area.y - 3, BASE_WIDTH * 3, 3); - let background = theme.get("ui.window"); + let background = theme.get("ui.help"); surface.clear_with(area, background); use tui::layout::Margin; |