@@ -111,6 +111,7 @@ impl Prompt {
111 pub fn render_prompt(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
111 pub fn render_prompt(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
112 let theme = &cx.editor.theme;
112 let theme = &cx.editor.theme;
113 let text_color = theme.get("ui.text.focus");
113 let text_color = theme.get("ui.text.focus");
114+ let selected_color = theme.get("ui.menu.selected");
114 // completion
115 // completion
116 let max_col = area.width / BASE_WIDTH;
117 let max_col = area.width / BASE_WIDTH;
@@ -133,7 +134,8 @@ impl Prompt {
134 for (i, (_range, completion)) in self.completion.iter().enumerate() {
135 for (i, (_range, completion)) in self.completion.iter().enumerate() {
135 let color = if Some(i) == self.selection {
136 let color = if Some(i) == self.selection {
136− Style::default().bg(Color::Rgb(104, 60, 232))
137+ // Style::default().bg(Color::Rgb(104, 60, 232))
138+ selected_color // TODO: just invert bg
138 text_color
140 text_color
@@ -158,14 +160,9 @@ impl Prompt {
158 if let Some(doc) = (self.doc_fn)(&self.line) {
160 if let Some(doc) = (self.doc_fn)(&self.line) {
159 let text = ui::Text::new(doc.to_string());
161 let text = ui::Text::new(doc.to_string());
161− let area = Rect::new(
163− completion_area.y - 3,
163+ let area = Rect::new(completion_area.x, completion_area.y - 3, BASE_WIDTH * 3, 3);
164− completion_area.width,
168− let background = theme.get("ui.window");
165+ let background = theme.get("ui.help");
169 surface.clear_with(area, background);
166 surface.clear_with(area, background);
171 use tui::layout::Margin;
168 use tui::layout::Margin;