mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
Handle carriage returns
This commit is contained in:
parent
1ecf2311e4
commit
e30cb66990
@ -938,10 +938,10 @@ fn run_tui_cook(
|
||||
log_text[start..end]
|
||||
.iter()
|
||||
.map(|s| {
|
||||
let text_with_colors = s
|
||||
let line_to_render = s.rsplit('\r').next().unwrap_or(s);
|
||||
let text_with_colors = line_to_render
|
||||
.into_text()
|
||||
.unwrap_or_else(|_| Text::raw("--unrenderable line--"));
|
||||
|
||||
text_with_colors
|
||||
.lines
|
||||
.into_iter()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user