From 7167cf9054588d71c21599ae1154c48680c64b09 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 14 Oct 2023 14:02:17 -0700 Subject: [PATCH] renderer: default cursor color to foreground Fixes #667 --- src/renderer/Metal.zig | 6 +----- src/renderer/OpenGL.zig | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index bee7327c4..4d2517836 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -1418,11 +1418,7 @@ fn addCursor( ), screen.cursor.x - 1 }; }; - const color = self.config.cursor_color orelse terminal.color.RGB{ - .r = 0xFF, - .g = 0xFF, - .b = 0xFF, - }; + const color = self.config.cursor_color orelse self.config.foreground; const sprite: font.Sprite = switch (cursor_style) { .block => .cursor_rect, diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index 8bc935559..c0b255ca2 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -869,11 +869,7 @@ fn addCursor( ), screen.cursor.x - 1 }; }; - const color = self.config.cursor_color orelse terminal.color.RGB{ - .r = 0xFF, - .g = 0xFF, - .b = 0xFF, - }; + const color = self.config.cursor_color orelse self.config.foreground; const sprite: font.Sprite = switch (cursor_style) { .block => .cursor_rect,