diff options
Diffstat (limited to 'src/gui/gui.zig')
| -rw-r--r-- | src/gui/gui.zig | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 51ec6bbf..202f4aa8 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -7,7 +7,6 @@ const posix = std.posix; /// libc: pipes and fcntl for the window's wakes, and a test harness's capture files written from the render thread. const libc = std.c; const vaxis = @import("vaxis"); // test modes only: the stdin escape-seq parser -const ghostty_vt = @import("ghostty-vt"); // 256-color palette for .index cells const pardes = @import("../pardes.zig"); const vaxis_input = @import("../vaxis_input.zig"); const dump = @import("../dump.zig"); @@ -4762,12 +4761,12 @@ fn resolveCell(g: *Gui, line: []const pardes.Cell, at: usize, cursor: ?usize, ro const st = cell.style; fg = switch (st.fg) { .default => fg_default, - .index => |i| palColor(i), + .index => |i| pardes.colors.xterm[i], .rgb => |rgb| rgb, }; switch (st.bg) { .default => {}, - .index => |i| bg = palColor(i), + .index => |i| bg = pardes.colors.xterm[i], .rgb => |rgb| bg = rgb, } if (st.reverse) reverse = !reverse; @@ -5139,11 +5138,6 @@ fn cellCodepoint(cell: *const pardes.Cell) u32 { return if (cell.default or grapheme.len == 0) ' ' else firstCp(grapheme); } -fn palColor(idx: u8) [3]u8 { - const p = ghostty_vt.color.default[idx]; - return .{ p.r, p.g, p.b }; -} - fn firstCp(s: []const u8) u32 { if (s.len == 0) return ' '; const n = std.unicode.utf8ByteSequenceLength(s[0]) catch return ' '; |
