feat(explore): add focus indicator

pull/9/head
wongjiahau 1 year ago
parent 64059fba47
commit 2a60662e8b

@ -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,

Loading…
Cancel
Save