From 3890376a23e84d5bcdac31cb9d0f6913abe0fc7f Mon Sep 17 00:00:00 2001 From: Dan Cardamore Date: Sun, 17 Mar 2024 18:55:49 -0400 Subject: add 'file-absolute-path' to statusline (#4535) * feat: add 'file-abs-path' to statusline (#4434) * cleanup implementation * rename to be non-abbreviated names --------- Co-authored-by: Michael Davis --- helix-term/src/ui/statusline.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'helix-term') diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index 9871828e..c3464067 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -142,6 +142,7 @@ where helix_view::editor::StatusLineElement::Spinner => render_lsp_spinner, helix_view::editor::StatusLineElement::FileBaseName => render_file_base_name, helix_view::editor::StatusLineElement::FileName => render_file_name, + helix_view::editor::StatusLineElement::FileAbsolutePath => render_file_absolute_path, helix_view::editor::StatusLineElement::FileModificationIndicator => { render_file_modification_indicator } @@ -430,6 +431,22 @@ where write(context, title, None); } +fn render_file_absolute_path(context: &mut RenderContext, write: F) +where + F: Fn(&mut RenderContext, String, Option