repl: Increase accuracy of error output line height (#14880)
This commit is contained in:
parent
781633fb1a
commit
cd9b25d827
2 changed files with 11 additions and 4 deletions
|
@ -78,7 +78,14 @@ impl TerminalOutput {
|
|||
})
|
||||
.collect::<Vec<TextRun>>();
|
||||
|
||||
let text = StyledText::new(self.handler.buffer.trim_end().to_string()).with_runs(runs);
|
||||
// Trim the last trailing newline for visual appeal
|
||||
let trimmed = self
|
||||
.handler
|
||||
.buffer
|
||||
.strip_suffix('\n')
|
||||
.unwrap_or(&self.handler.buffer);
|
||||
|
||||
let text = StyledText::new(trimmed.to_string()).with_runs(runs);
|
||||
div()
|
||||
.font_family(buffer_font)
|
||||
.child(text)
|
||||
|
@ -212,7 +219,7 @@ impl Perform for TerminalHandler {
|
|||
}
|
||||
_ => {
|
||||
// Format as hex
|
||||
println!("[execute] byte={:02x}", byte);
|
||||
// println!("[execute] byte={:02x}", byte);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue