Handle newlines in register infobox
This commit is contained in:
parent
bf773db451
commit
fa83426011
@ -58,7 +58,12 @@ pub fn from_registers(registers: &Registers) -> Self {
|
||||
.inner()
|
||||
.iter()
|
||||
.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)
|
||||
})
|
||||
.collect();
|
||||
|
Loading…
Reference in New Issue
Block a user