mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 10:11:07 +00:00
Fix header-line if grid is not requested
This commit is contained in:
parent
747d074be1
commit
b2b932f3ed
@ -44,6 +44,7 @@ impl<'a> Printer<'a> {
|
|||||||
" ".repeat(PANEL_WIDTH),
|
" ".repeat(PANEL_WIDTH),
|
||||||
self.colors.grid.paint("│"),
|
self.colors.grid.paint("│"),
|
||||||
)?;
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
writeln!(
|
writeln!(
|
||||||
self.handle,
|
self.handle,
|
||||||
@ -52,14 +53,11 @@ impl<'a> Printer<'a> {
|
|||||||
self.colors.filename.paint(filename.unwrap_or("STDIN"))
|
self.colors.filename.paint(filename.unwrap_or("STDIN"))
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
self.print_horizontal_line('┼')
|
if self.options.output_components.grid() {
|
||||||
} else {
|
self.print_horizontal_line('┼')?;
|
||||||
writeln!(
|
|
||||||
self.handle,
|
|
||||||
"File {}",
|
|
||||||
self.colors.filename.paint(filename.unwrap_or("STDIN"))
|
|
||||||
).map_err(Into::into)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn print_footer(&mut self) -> Result<()> {
|
pub fn print_footer(&mut self) -> Result<()> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user