1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-30 18:11:44 +00:00

fix bug where long lines were truncated in plain mode without wrap=never not being set

This commit is contained in:
mark chaitin
2021-01-06 20:17:00 -05:00
committed by David Peter
parent 7ffb04a17a
commit 83c9cb7907
5 changed files with 52 additions and 49 deletions
+3 -3
View File
@@ -150,10 +150,10 @@ impl App {
wrapping_mode: if self.interactive_output || maybe_term_width.is_some() {
match self.matches.value_of("wrap") {
Some("character") => WrappingMode::Character,
Some("never") => WrappingMode::NoWrapping,
Some("never") => WrappingMode::NoWrapping(true),
Some("auto") | None => {
if style_components.plain() {
WrappingMode::NoWrapping
WrappingMode::NoWrapping(false)
} else {
WrappingMode::Character
}
@@ -163,7 +163,7 @@ impl App {
} else {
// We don't have the tty width when piping to another program.
// There's no point in wrapping when this is the case.
WrappingMode::NoWrapping
WrappingMode::NoWrapping(false)
},
colored_output: self.matches.is_present("force-colorization")
|| match self.matches.value_of("color") {