diff options
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index ef61ebdf..7a409e2e 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -425,9 +425,11 @@ impl<'a, C> Iterator for RenderableCellsIter<'a, C> { // Apply cursor color, or invert the cursor if it has a fixed background close // to the cell's background. - match self.cursor.cursor_color { - CellRgb::Rgb(color) if color.contrast(cell.bg) < MIN_CURSOR_CONTRAST => (), - _ => cell.fg = self.cursor.cursor_color.color(cell.fg, cell.bg), + if !matches!( + self.cursor.cursor_color, + CellRgb::Rgb(color) if color.contrast(cell.bg) < MIN_CURSOR_CONTRAST + ) { + cell.fg = self.cursor.cursor_color.color(cell.fg, cell.bg); } return Some(cell); |