summaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorspectre2562023-06-08 19:34:07 +0000
committerGitHub2023-06-08 19:34:07 +0000
commit00b152facd8cc9d671f1781a3b931bcc9830efce (patch)
tree96816ca91e57199709ba380188a6f493ee35e9a4 /helix-term
parent993c68ad6f9d15c3870871ae5be16ebbd4de0382 (diff)
Add register statusline element (#7222)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/statusline.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index dbf5ac31..61fca609 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -160,6 +160,7 @@ where
helix_view::editor::StatusLineElement::Separator => render_separator,
helix_view::editor::StatusLineElement::Spacer => render_spacer,
helix_view::editor::StatusLineElement::VersionControl => render_version_control,
+ helix_view::editor::StatusLineElement::Register => render_register,
}
}
@@ -489,3 +490,12 @@ where
write(context, head, None);
}
+
+fn render_register<F>(context: &mut RenderContext, write: F)
+where
+ F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
+{
+ if let Some(reg) = context.editor.selected_register {
+ write(context, format!(" reg={} ", reg), None)
+ }
+}