From e1b2bd501b2aa2a12bd33815cb36300d8aa1c609 Mon Sep 17 00:00:00 2001 From: godalming Date: Tue, 4 Jun 2024 18:59:32 +0100 Subject: [PATCH] add-a-way-to-only-show-the-horizontal-or-vertical-position-in-statusline --- helix-term/src/ui/statusline.rs | 26 ++++++++++++++++++++++++++ helix-view/src/editor.rs | 6 ++++++ 2 files changed, 32 insertions(+) diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index 7437cbd07..47e311133 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -157,6 +157,8 @@ where render_primary_selection_length } helix_view::editor::StatusLineElement::Position => render_position, + helix_view::editor::StatusLineElement::Row => render_row, + helix_view::editor::StatusLineElement::Col => render_col, helix_view::editor::StatusLineElement::PositionPercentage => render_position_percentage, helix_view::editor::StatusLineElement::TotalLineNumbers => render_total_line_numbers, helix_view::editor::StatusLineElement::Separator => render_separator, @@ -348,6 +350,30 @@ where ); } +fn render_row(context: &mut RenderContext, write: F) +where + F: Fn(&mut RenderContext, String, Option