Skip to content

Commit

Permalink
Fix statusline diagnostics spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
hamrik committed Jun 11, 2023
1 parent 35f4bea commit ef9d76a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions helix-term/src/ui/statusline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ pub struct RenderContext<'a> {
pub parts: RenderBuffer<'a>,
}

fn do_warning() {
unsafe {
let x: &'static i32 = std::mem::zeroed();
}
}

impl<'a> RenderContext<'a> {
pub fn new(
editor: &'a Editor,
Expand Down Expand Up @@ -249,14 +255,13 @@ fn render_workspace_diagnostics<'a>(context: &RenderContext) -> Spans<'a> {
}

if warnings > 0 {
spans.push(" ", context.base_style);
spans.push("●", context.editor.theme.get("warning"));
spans.push(
format!(" {}{}", warnings, if errors > 0 { " " } else { "" }),
context.base_style,
);
spans.push(format!(" {}", warnings), context.base_style);
}

if errors > 0 {
spans.push(" ", context.base_style);
spans.push("●", context.editor.theme.get("error"));
spans.push(format!(" {}", errors), context.base_style);
}
Expand Down

0 comments on commit ef9d76a

Please sign in to comment.