From c144cc0b04c18d6749016773073a23b5e42d5804 Mon Sep 17 00:00:00 2001 From: Joshua Pauline Date: Tue, 4 Oct 2022 01:54:00 +1100 Subject: feat(statusline): add option to show total line numbers in file (#3960) * feat(statusline): add option to show total line numbers in file * feat(line numbers): add config to doc book--- helix-term/src/ui/statusline.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'helix-term/src') diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index 9bbb268f..b0e8ec5d 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -144,6 +144,7 @@ where helix_view::editor::StatusLineElement::Selections => render_selections, helix_view::editor::StatusLineElement::Position => render_position, 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::Spacer => render_spacer, } @@ -276,6 +277,15 @@ where ); } +fn render_total_line_numbers(context: &mut RenderContext, write: F) +where + F: Fn(&mut RenderContext, String, Option