mirror of
https://github.com/ilyakooo0/bat.git
synced 2024-11-10 14:05:27 +03:00
Fix \r character being printed with wrapping enabled.
This commit is contained in:
parent
b327127f37
commit
a5a7dc14e4
@ -142,8 +142,9 @@ impl<'a> Printer<'a> {
|
||||
)?;
|
||||
} else {
|
||||
for &(style, text) in regions.iter() {
|
||||
let mut chars = text.chars().filter(|c| *c != '\n');
|
||||
let mut remaining = text.chars().filter(|c| *c != '\n').count();
|
||||
let text = text.trim_right_matches(|c| c == '\r' || c == '\n');
|
||||
let mut chars = text.chars();
|
||||
let mut remaining = text.chars().count();
|
||||
|
||||
while remaining > 0 {
|
||||
let available = cursor_max - cursor;
|
||||
|
Loading…
Reference in New Issue
Block a user