From 2a60662e8bcb0979b44504d1b5fb485422b32249 Mon Sep 17 00:00:00 2001 From: wongjiahau Date: Mon, 20 Feb 2023 11:27:06 +0800 Subject: [PATCH] feat(explore): add focus indicator --- helix-term/src/ui/explore.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helix-term/src/ui/explore.rs b/helix-term/src/ui/explore.rs index b887c5f2..9da83af1 100644 --- a/helix-term/src/ui/explore.rs +++ b/helix-term/src/ui/explore.rs @@ -509,12 +509,18 @@ impl Explorer { } fn render_tree(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) { + let title_style = cx.editor.theme.get("ui.text"); + let title_style = if self.is_focus() { + title_style.add_modifier(Modifier::BOLD) + } else { + title_style + }; surface.set_stringn( area.x, area.y, "Explorer: press ? for help", area.width.into(), - cx.editor.theme.get("ui.text"), + title_style, ); surface.set_stringn( area.x,