mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-22 05:28:45 +01: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 {
|
} else {
|
||||||
for &(style, text) in regions.iter() {
|
for &(style, text) in regions.iter() {
|
||||||
let mut chars = text.chars().filter(|c| *c != '\n');
|
let text = text.trim_right_matches(|c| c == '\r' || c == '\n');
|
||||||
let mut remaining = text.chars().filter(|c| *c != '\n').count();
|
let mut chars = text.chars();
|
||||||
|
let mut remaining = text.chars().count();
|
||||||
|
|
||||||
while remaining > 0 {
|
while remaining > 0 {
|
||||||
let available = cursor_max - cursor;
|
let available = cursor_max - cursor;
|
||||||
|
Loading…
Reference in New Issue
Block a user