1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-26 17:31:42 +00:00

be consistent

This commit is contained in:
Taylor
2018-10-10 22:19:40 -06:00
parent 2a7851530d
commit cea05e9f22
2 changed files with 6 additions and 12 deletions
+4 -10
View File
@@ -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 {