feat: always render the statusline

This commit is contained in:
Nikita Revenco 2025-02-07 21:04:56 +00:00
parent df96f0c122
commit da577cf1ac

View file

@ -241,20 +241,7 @@ impl EditorView {
let mut context = let mut context =
statusline::RenderContext::new(editor, doc, view, is_focused, &self.spinners); statusline::RenderContext::new(editor, doc, view, is_focused, &self.spinners);
let is_bottom_statusline = viewport.height - statusline_area.y == 1; statusline::render(&mut context, statusline_area, surface)
let has_editor_status = editor.status_msg.is_some();
// We always render the statusline, unless it meets all of these conditions:
// - It's at the bottom of the screen
// - There is a status message
// - We want to merge the statusline with the commandline
//
// In this case, the status message is overlaid on top of the statusline, and we do not render the statusline.
if is_bottom_statusline && has_editor_status && config.statusline.merge_with_commandline {
// do not render the statusline
} else {
statusline::render(&mut context, statusline_area, surface)
}
} }
pub fn render_rulers( pub fn render_rulers(