mirror of https://github.com/helix-editor/helix
Handle newlines in register infobox
parent
bf773db451
commit
fa83426011
|
@ -58,7 +58,12 @@ impl Info {
|
||||||
.inner()
|
.inner()
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(ch, reg)| {
|
.map(|(ch, reg)| {
|
||||||
let content = reg.read().join(", ").trim_end().to_string();
|
let content = reg
|
||||||
|
.read()
|
||||||
|
.get(0)
|
||||||
|
.and_then(|s| s.lines().next())
|
||||||
|
.map(String::from)
|
||||||
|
.unwrap_or_default();
|
||||||
(ch.to_string(), content)
|
(ch.to_string(), content)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
Loading…
Reference in New Issue