diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index 29136dfee..ae9868db5 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -2555,14 +2555,7 @@ fn updateCell( break :glyph; } - var mode: mtl_shaders.CellText.Mode = .{ - .fg = true, - .fg_constrained = false, - .fg_color = false, - .cursor = false, - .fg_powerline = false, - .fg_blink = false, - }; + var mode: mtl_shaders.CellText.Mode = .{ .fg = true }; switch (try fgMode( render.presentation, @@ -2613,14 +2606,7 @@ fn updateCell( const color = style.underlineColor(palette) orelse colors.fg; try self.cells.add(self.alloc, .underline, .{ - .mode = .{ - .fg = true, - .fg_constrained = false, - .fg_color = false, - .cursor = false, - .fg_powerline = false, - .fg_blink = false, - }, + .mode = .{ .fg = true }, .grid_pos = .{ @intCast(coord.x), @intCast(coord.y) }, .constraint_width = cell.gridWidth(), .color = .{ color.r, color.g, color.b, alpha }, @@ -2645,14 +2631,7 @@ fn updateCell( ); try self.cells.add(self.alloc, .strikethrough, .{ - .mode = .{ - .fg = true, - .fg_constrained = false, - .fg_color = false, - .cursor = false, - .fg_powerline = false, - .fg_blink = false, - }, + .mode = .{ .fg = true }, .grid_pos = .{ @intCast(coord.x), @intCast(coord.y) }, .constraint_width = cell.gridWidth(), .color = .{ colors.fg.r, colors.fg.g, colors.fg.b, alpha }, @@ -2714,14 +2693,7 @@ fn addCursor( }; self.cells.setCursor(.{ - .mode = .{ - .fg = false, - .fg_constrained = false, - .fg_color = false, - .cursor = true, - .fg_powerline = false, - .fg_blink = false, - }, + .mode = .{ .fg = false, .cursor = true }, .grid_pos = .{ x, screen.cursor.y }, .color = .{ cursor_color.r, cursor_color.g, cursor_color.b, alpha }, .glyph_pos = .{ render.glyph.atlas_x, render.glyph.atlas_y }, @@ -2770,14 +2742,7 @@ fn addPreeditCell( // Add our text try self.cells.add(self.alloc, .text, .{ - .mode = .{ - .fg = true, - .fg_constrained = false, - .fg_color = false, - .cursor = false, - .fg_powerline = false, - .fg_blink = false, - }, + .mode = .{ .fg = true }, .grid_pos = .{ @intCast(coord.x), @intCast(coord.y) }, .color = .{ fg.r, fg.g, fg.b, 255 }, .glyph_pos = .{ render.glyph.atlas_x, render.glyph.atlas_y }, diff --git a/src/renderer/metal/shaders.zig b/src/renderer/metal/shaders.zig index cad1f5b8b..4ab9655dd 100644 --- a/src/renderer/metal/shaders.zig +++ b/src/renderer/metal/shaders.zig @@ -329,11 +329,11 @@ pub const CellText = extern struct { pub const Mode = packed struct(u8) { fg: bool, - fg_constrained: bool, - fg_color: bool, - cursor: bool, - fg_powerline: bool, - fg_blink: bool, + fg_constrained: bool = false, + fg_color: bool = false, + cursor: bool = false, + fg_powerline: bool = false, + fg_blink: bool = false, _padding: u2 = 0, };