@@ -6,8 +6,12 @@ use tui::widgets::{Block, Borders, Paragraph, Widget};
66
77impl Component for Info {
88 fn render(&mut self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
9− let text_style = cx.editor.theme.get("ui.text.focus");
10− let popup_style = text_style.patch(cx.editor.theme.get("ui.popup"));
9+ let get_theme = |style, fallback| {
10+ let theme = &cx.editor.theme;
11+ theme.try_get(style).unwrap_or_else(|| theme.get(fallback))
12+ };
13+ let text_style = get_theme("ui.info.text", "ui.text");
14+ let popup_style = text_style.patch(get_theme("ui.info", "ui.popup"));
1115
1216 // Calculate the area of the terminal to modify. Because we want to
1317 // render at the bottom right, we use the viewport's width and height