@@ -230,7 +230,7 @@ impl<T: Item + 'static> Component for Menu<T> {
230230 fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> {
231231 let width = std::cmp::min(30, viewport.0);
232232
233− const MAX: usize = 5;
233+ const MAX: usize = 10;
234234 let height = std::cmp::min(self.options.len(), MAX);
235235 let height = std::cmp::min(height, viewport.1 as usize);
236236
@@ -242,9 +242,11 @@ impl<T: Item + 'static> Component for Menu<T> {
242242 Some(self.size)
243243 }
244244
245+ // TODO: required size should re-trigger when we filter items so we can draw a smaller menu
246+
245247 fn render(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
246248 let style = cx.editor.theme.get("ui.text");
247− let selected = Style::default().fg(Color::Rgb(255, 255, 255));
249+ let selected = cx.editor.theme.get("ui.menu.selected");
248250
249251 let scroll = self.scroll;
250252
@@ -289,13 +291,21 @@ impl<T: Item + 'static> Component for Menu<T> {
289291 },
290292 );
291293
294+ // // TODO: set bg for the whole row if selected
295+ // if line == self.cursor {
296+ // surface.set_style(
297+ // Rect::new(area.x, area.y + i as u16, area.width - 1, 1),
298+ // selected,
299+ // )
300+ // }
301+
292302 for (i, option) in (scroll..(scroll + win_height).min(len)).enumerate() {
293303 let is_marked = i >= scroll_line && i < scroll_line + scroll_height;
294304
295305 if is_marked {
296306 let cell = surface.get_mut(area.x + area.width - 2, area.y + i as u16);
297307 cell.set_symbol("▐ ");
298− cell.set_style(selected);
308+ // cell.set_style(selected);
299309 // cell.set_style(if is_marked { selected } else { style });
300310 }
301311 }