From d1d7665510e281354abf2b771742825fd4ba7f0e Mon Sep 17 00:00:00 2001 From: Leaf Garland Date: Sun, 28 Jan 2024 20:20:40 +1300 Subject: [PATCH] Default to background color for cursor-text Previously the default was black which doesn't work so well if the cursor block is dark. --- src/renderer/Metal.zig | 2 +- src/renderer/OpenGL.zig | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index 3ef7d7869..4a580ace9 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -1738,7 +1738,7 @@ fn rebuildCells( cell.color = if (self.config.cursor_text) |txt| .{ txt.r, txt.g, txt.b, 255 } else - .{ 0, 0, 0, 255 }; + .{ self.background_color.r, self.background_color.g, self.background_color.b, 255 }; } self.cells.appendAssumeCapacity(cell.*); diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index a3e0721ec..34a326379 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -1168,9 +1168,9 @@ pub fn rebuildCells( cell.b = txt.b; cell.a = 255; } else { - cell.r = 0; - cell.g = 0; - cell.b = 0; + cell.r = self.background_color.r; + cell.g = self.background_color.g; + cell.b = self.background_color.b; cell.a = 255; } }