From 97968debe8564a79b4eef89988ec1897ae7dd9a9 Mon Sep 17 00:00:00 2001 From: Sam Rees Date: Tue, 9 Jan 2024 13:48:40 +0000 Subject: [PATCH] Added CWD option for editor.statusline --- helix-term/src/ui/statusline.rs | 21 +++++++++++++++++++++ helix-view/src/editor.rs | 3 +++ 2 files changed, 24 insertions(+) diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index 9871828ee..fc553cd87 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -162,6 +162,7 @@ where helix_view::editor::StatusLineElement::Spacer => render_spacer, helix_view::editor::StatusLineElement::VersionControl => render_version_control, helix_view::editor::StatusLineElement::Register => render_register, + helix_view::editor::StatusLineElement::WorkingDirectory => render_cwd, } } @@ -514,3 +515,23 @@ where write(context, format!(" reg={} ", reg), None) } } + +fn render_cwd(context: &mut RenderContext, write: F) +where + F: Fn(&mut RenderContext, String, Option