aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/statusline.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index 3e7065b8..88786351 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -159,6 +159,7 @@ where
helix_view::editor::StatusLineElement::TotalLineNumbers => render_total_line_numbers,
helix_view::editor::StatusLineElement::Separator => render_separator,
helix_view::editor::StatusLineElement::Spacer => render_spacer,
+ helix_view::editor::StatusLineElement::VersionControl => render_version_control,
}
}
@@ -476,3 +477,16 @@ where
{
write(context, String::from(" "), None);
}
+
+fn render_version_control<F>(context: &mut RenderContext, write: F)
+where
+ F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
+{
+ let head = context
+ .doc
+ .version_control_head()
+ .unwrap_or_default()
+ .to_string();
+
+ write(context, head, None);
+}