@@ -200,13 +200,18 @@ impl<'a> InteractivePrinter<'a> {
200200 })
201201 }
202202
203+ fn print_horizontal_line_term(&mut self, handle: &mut dyn Write, style: Style) -> Result<()> {
204+ writeln!(
205+ handle,
206+ "{}",
207+ style.paint("─".repeat(self.config.term_width))
208+ )?;
209+ Ok(())
210+ }
211+
203212 fn print_horizontal_line(&mut self, handle: &mut dyn Write, grid_char: char) -> Result<()> {
204213 if self.panel_width == 0 {
205− writeln!(
206− handle,
207− "{}",
208− self.colors.grid.paint("─".repeat(self.config.term_width))
209− )?;
214+ self.print_horizontal_line_term(handle, self.colors.grid)?;
210215 } else {
211216 let hline = "─".repeat(self.config.term_width - (self.panel_width + 1));
212217 let hline = format!("{}{}{}", "─".repeat(self.panel_width), grid_char, hline);
@@ -251,6 +256,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
251256 input: &OpenedInput,
252257 add_header_padding: bool,
253258 ) -> Result<()> {
259+ if add_header_padding && self.config.style_components.rule() {
260+ self.print_horizontal_line_term(handle, self.colors.rule)?;
261+ }
262+
254263 if !self.config.style_components.header() {
255264 if Some(ContentType::BINARY) == self.content_type && !self.config.show_nonprintable {
256265 writeln!(
@@ -279,7 +288,8 @@ impl<'a> Printer for InteractivePrinter<'a> {
279288 .paint(if self.panel_width > 0 { "│ " } else { "" }),
280289 )?;
281290 } else {
282− if add_header_padding {
291+ // Only pad space between files, if we haven't already drawn a horizontal rule
292+ if add_header_padding && !self.config.style_components.rule() {
283293 writeln!(handle)?;
284294 }
285295 write!(handle, "{}", " ".repeat(self.panel_width))?;
@@ -603,6 +613,7 @@ const DEFAULT_GUTTER_COLOR: u8 = 238;
603613#[derive(Debug, Default)]
604614pub struct Colors {
605615 pub grid: Style,
616+ pub rule: Style,
606617 pub filename: Style,
607618 pub git_added: Style,
608619 pub git_removed: Style,
@@ -624,6 +635,7 @@ impl Colors {
624635
625636 Colors {
626637 grid: gutter_color.normal(),
638+ rule: gutter_color.normal(),
627639 filename: Style::new().bold(),
628640 git_added: Green.normal(),
629641 git_removed: Red.normal(),