From c484b089230b541e63edc34a041e2842f2942e23 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Fri, 4 Mar 2022 06:01:51 +0530 Subject: Rename infobox theme scopes (#1741) This makes it play nicely with https://github.com/helix-editor/helix/pull/1714--- helix-term/src/ui/info.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/info.rs b/helix-term/src/ui/info.rs index 55b0e65d..272244c1 100644 --- a/helix-term/src/ui/info.rs +++ b/helix-term/src/ui/info.rs @@ -6,12 +6,8 @@ use tui::widgets::{Block, Borders, Paragraph, Widget}; impl Component for Info { fn render(&mut self, viewport: Rect, surface: &mut Surface, cx: &mut Context) { - let get_theme = |style, fallback| { - let theme = &cx.editor.theme; - theme.try_get(style).unwrap_or_else(|| theme.get(fallback)) - }; - let text_style = get_theme("ui.info.text", "ui.text"); - let popup_style = text_style.patch(get_theme("ui.info", "ui.popup")); + let text_style = cx.editor.theme.get("ui.text.info"); + let popup_style = cx.editor.theme.get("ui.popup.info"); // Calculate the area of the terminal to modify. Because we want to // render at the bottom right, we use the viewport's width and height -- cgit v1.2.3-70-g09d2