1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-03-20 01:28:49 +00:00

Fix header-line if grid is not requested

This commit is contained in:
Pit Kleyersburg 2018-05-09 22:34:03 +02:00
parent 615ae17784
commit 86fa200157

View File

@ -44,6 +44,7 @@ impl<'a> Printer<'a> {
" ".repeat(PANEL_WIDTH),
self.colors.grid.paint(""),
)?;
}
writeln!(
self.handle,
@ -52,14 +53,11 @@ impl<'a> Printer<'a> {
self.colors.filename.paint(filename.unwrap_or("STDIN"))
)?;
self.print_horizontal_line('┼')
} else {
writeln!(
self.handle,
"File {}",
self.colors.filename.paint(filename.unwrap_or("STDIN"))
).map_err(Into::into)
if self.options.output_components.grid() {
self.print_horizontal_line('┼')?;
}
Ok(())
}
pub fn print_footer(&mut self) -> Result<()> {