mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-22 05:28:45 +01:00
Fix header-line if grid is not requested
This commit is contained in:
parent
747d074be1
commit
b2b932f3ed
@ -44,22 +44,20 @@ impl<'a> Printer<'a> {
|
||||
" ".repeat(PANEL_WIDTH),
|
||||
self.colors.grid.paint("│"),
|
||||
)?;
|
||||
|
||||
writeln!(
|
||||
self.handle,
|
||||
"{}{}",
|
||||
filename.map_or("", |_| "File: "),
|
||||
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)
|
||||
}
|
||||
|
||||
writeln!(
|
||||
self.handle,
|
||||
"{}{}",
|
||||
filename.map_or("", |_| "File: "),
|
||||
self.colors.filename.paint(filename.unwrap_or("STDIN"))
|
||||
)?;
|
||||
|
||||
if self.options.output_components.grid() {
|
||||
self.print_horizontal_line('┼')?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn print_footer(&mut self) -> Result<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user