mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-24 11:38:33 +02:00
Remove padding if the header style is not enabled
This commit is contained in:
parent
0040fef215
commit
b3373398e8
@ -247,8 +247,6 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
)?;
|
)?;
|
||||||
} else if self.config.style_components.grid() {
|
} else if self.config.style_components.grid() {
|
||||||
self.print_horizontal_line(handle, '┬')?;
|
self.print_horizontal_line(handle, '┬')?;
|
||||||
} else if add_header_padding {
|
|
||||||
writeln!(handle)?;
|
|
||||||
}
|
}
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
@ -632,11 +632,11 @@ fn filename_multiple_err() {
|
|||||||
fn header_padding() {
|
fn header_padding() {
|
||||||
bat()
|
bat()
|
||||||
.arg("--decorations=always")
|
.arg("--decorations=always")
|
||||||
.arg("--style=plain")
|
.arg("--style=header")
|
||||||
.arg("test.txt")
|
.arg("test.txt")
|
||||||
.arg("single-line.txt")
|
.arg("single-line.txt")
|
||||||
.assert()
|
.assert()
|
||||||
.stdout("hello world\n\nSingle Line\n")
|
.stdout("File: test.txt\nhello world\n\nFile: single-line.txt\nSingle Line\n")
|
||||||
.stderr("");
|
.stderr("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user