mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-12 08:12:27 +01:00
be consistent
This commit is contained in:
@@ -302,16 +302,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
||||
}
|
||||
|
||||
// Line highlighting
|
||||
let background = match self.config.highlight_line {
|
||||
Some(line) => {
|
||||
if line_number == line {
|
||||
self.background_highlight
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
let background = self.config.highlight_line
|
||||
.filter(|line| *line == line_number)
|
||||
.map(|_| self.background_highlight)
|
||||
.unwrap();
|
||||
|
||||
// Line contents.
|
||||
if self.config.output_wrap == OutputWrap::None {
|
||||
|
Reference in New Issue
Block a user