feat: unobtrusive statusline highlight bg surface

pull/12020/head
Nikita Revenco 3 weeks ago
parent d9727082b3
commit 84c8c75245

@ -56,9 +56,17 @@ pub fn render(context: &mut RenderContext, viewport: Rect, surface: &mut Surface
context.editor.theme.get("ui.statusline.inactive") context.editor.theme.get("ui.statusline.inactive")
}; };
if !unobtrusive_statusline { let surface_style = if unobtrusive_statusline {
surface.set_style(viewport.with_height(1), base_style); let surface_bg = match base_style.bg {
} Some(color) => color,
None => helix_view::theme::Color::Reset
};
Style::default().bg(surface_bg)
} else {
base_style
};
surface.set_style(viewport.with_height(1), surface_style);
let write_left = |context: &mut RenderContext, text, style| { let write_left = |context: &mut RenderContext, text, style| {
append(&mut context.parts.left, text, &base_style, style) append(&mut context.parts.left, text, &base_style, style)

Loading…
Cancel
Save