diff --git a/book/src/themes.md b/book/src/themes.md index f17195aa..0a4d58ad 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -91,6 +91,9 @@ Possible keys: | `ui.help` | | | `ui.text` | | | `ui.text.focus` | | +| `ui.info` | | +| `ui.info.text` | | +| `ui.menu` | | | `ui.menu.selected` | | | `ui.selection` | For selections in the editing area | | `ui.selection.primary` | | diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index a56cf19b..24dd3e61 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -259,8 +259,11 @@ impl Component for Menu { // TODO: required size should re-trigger when we filter items so we can draw a smaller menu fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) { - let style = cx.editor.theme.get("ui.text"); - let selected = cx.editor.theme.get("ui.menu.selected"); + let theme = &cx.editor.theme; + let style = theme + .try_get("ui.menu") + .unwrap_or_else(|| theme.get("ui.text")); + let selected = theme.get("ui.menu.selected"); let scroll = self.scroll;