From b3373398e81d25ece5c654e4e755a38eb0de135e Mon Sep 17 00:00:00 2001 From: Prat T Date: Tue, 12 May 2020 07:06:58 -0700 Subject: [PATCH] Remove padding if the header style is not enabled --- src/printer.rs | 2 -- tests/integration_tests.rs | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/printer.rs b/src/printer.rs index 85dc9093..cfc9d1af 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -247,8 +247,6 @@ impl<'a> Printer for InteractivePrinter<'a> { )?; } else if self.config.style_components.grid() { self.print_horizontal_line(handle, '┬')?; - } else if add_header_padding { - writeln!(handle)?; } return Ok(()); } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index c8d3d37f..b35b5ff9 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -632,11 +632,11 @@ fn filename_multiple_err() { fn header_padding() { bat() .arg("--decorations=always") - .arg("--style=plain") + .arg("--style=header") .arg("test.txt") .arg("single-line.txt") .assert() - .stdout("hello world\n\nSingle Line\n") + .stdout("File: test.txt\nhello world\n\nFile: single-line.txt\nSingle Line\n") .stderr(""); }