|
|
@ -144,6 +144,7 @@ where
|
|
|
|
helix_view::editor::StatusLineElement::Selections => render_selections,
|
|
|
|
helix_view::editor::StatusLineElement::Selections => render_selections,
|
|
|
|
helix_view::editor::StatusLineElement::Position => render_position,
|
|
|
|
helix_view::editor::StatusLineElement::Position => render_position,
|
|
|
|
helix_view::editor::StatusLineElement::PositionPercentage => render_position_percentage,
|
|
|
|
helix_view::editor::StatusLineElement::PositionPercentage => render_position_percentage,
|
|
|
|
|
|
|
|
helix_view::editor::StatusLineElement::TotalLineNumbers => render_total_line_numbers,
|
|
|
|
helix_view::editor::StatusLineElement::Separator => render_separator,
|
|
|
|
helix_view::editor::StatusLineElement::Separator => render_separator,
|
|
|
|
helix_view::editor::StatusLineElement::Spacer => render_spacer,
|
|
|
|
helix_view::editor::StatusLineElement::Spacer => render_spacer,
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -276,6 +277,15 @@ where
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn render_total_line_numbers<F>(context: &mut RenderContext, write: F)
|
|
|
|
|
|
|
|
where
|
|
|
|
|
|
|
|
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let total_line_numbers = context.doc.text().len_lines();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write(context, format!(" {} ", total_line_numbers), None);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn render_position_percentage<F>(context: &mut RenderContext, write: F)
|
|
|
|
fn render_position_percentage<F>(context: &mut RenderContext, write: F)
|
|
|
|
where
|
|
|
|
where
|
|
|
|
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
|
|
|
|
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
|
|
|
|