on master help sign in
Handle newlines in register infobox
fa83426Gokul Soumya
helix-view/src/info.rs+6−1
@@ -58,7 +58,12 @@ impl Info {
58 .inner()
58 .inner()
59 .iter()
59 .iter()
60 .map(|(ch, reg)| {
60 .map(|(ch, reg)| {
61− let content = reg.read().join(", ").trim_end().to_string();
61+ let content = reg
62+ .read()
63+ .get(0)
64+ .and_then(|s| s.lines().next())
65+ .map(String::from)
66+ .unwrap_or_default();
62 (ch.to_string(), content)
67 (ch.to_string(), content)
63 })
68 })
64 .collect();
69 .collect();