renderer: unfocused cursor should always be fully opaque

This commit is contained in:
Mitchell Hashimoto
2023-10-14 14:11:15 -07:00
parent ff38d3e358
commit b4070eb67e
2 changed files with 2 additions and 2 deletions

View File

@ -1422,7 +1422,7 @@ fn addCursor(
};
const color = self.config.cursor_color orelse self.config.foreground;
const alpha: u8 = alpha: {
const alpha: u8 = if (!self.focused) 255 else alpha: {
const alpha = 255 * self.config.cursor_opacity;
break :alpha @intFromFloat(@ceil(alpha));
};

View File

@ -873,7 +873,7 @@ fn addCursor(
};
const color = self.config.cursor_color orelse self.config.foreground;
const alpha: u8 = alpha: {
const alpha: u8 = if (!self.focused) 255 else alpha: {
const alpha = 255 * self.config.cursor_opacity;
break :alpha @intFromFloat(@ceil(alpha));
};