Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/info.rs')
-rw-r--r--helix-view/src/info.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/info.rs b/helix-view/src/info.rs
index 7fc43f22..d1e90b5a 100644
--- a/helix-view/src/info.rs
+++ b/helix-view/src/info.rs
@@ -57,13 +57,13 @@ impl Info {
}
}
- pub fn from_registers(registers: &Registers) -> Self {
+ pub fn from_registers(title: impl Into<Cow<'static, str>>, registers: &Registers) -> Self {
let body: Vec<_> = registers
.iter_preview()
.map(|(ch, preview)| (ch.to_string(), preview))
.collect();
- let mut infobox = Self::new("Registers", &body);
+ let mut infobox = Self::new(title, &body);
infobox.width = 30; // copied content could be very long
infobox
}