@@ -33,7 +33,12 @@ use crate::terminal::{as_terminal_escaped, to_ansi_color};
3333use crate::wrapping::WrappingMode;
3434
3535pub(crate) trait Printer {
36− fn print_header(&mut self, handle: &mut dyn Write, input: &OpenedInput) -> Result<()>;
36+ fn print_header(
37+ &mut self,
38+ handle: &mut dyn Write,
39+ input: &OpenedInput,
40+ add_header_padding: bool,
41+ ) -> Result<()>;
3742 fn print_footer(&mut self, handle: &mut dyn Write, input: &OpenedInput) -> Result<()>;
3843
3944 fn print_snip(&mut self, handle: &mut dyn Write) -> Result<()>;
@@ -56,7 +61,12 @@ impl SimplePrinter {
5661}
5762
5863impl Printer for SimplePrinter {
59− fn print_header(&mut self, _handle: &mut dyn Write, _input: &OpenedInput) -> Result<()> {
64+ fn print_header(
65+ &mut self,
66+ _handle: &mut dyn Write,
67+ _input: &OpenedInput,
68+ _add_header_padding: bool,
69+ ) -> Result<()> {
6070 Ok(())
6171 }
6272
@@ -219,7 +229,12 @@ impl<'a> InteractivePrinter<'a> {
219229}
220230
221231impl<'a> Printer for InteractivePrinter<'a> {
222− fn print_header(&mut self, handle: &mut dyn Write, input: &OpenedInput) -> Result<()> {
232+ fn print_header(
233+ &mut self,
234+ handle: &mut dyn Write,
235+ input: &OpenedInput,
236+ add_header_padding: bool,
237+ ) -> Result<()> {
223238 if !self.config.style_components.header() {
224239 if Some(ContentType::BINARY) == self.content_type && !self.config.show_nonprintable {
225240 writeln!(
@@ -248,6 +263,9 @@ impl<'a> Printer for InteractivePrinter<'a> {
248263 .paint(if self.panel_width > 0 { "│ " } else { "" }),
249264 )?;
250265 } else {
266+ if add_header_padding {
267+ writeln!(handle)?;
268+ }
251269 write!(handle, "{}", " ".repeat(self.panel_width))?;
252270 }
253271