diff --git a/src/config.zig b/src/config.zig index a8ffe2ec7..a06e19872 100644 --- a/src/config.zig +++ b/src/config.zig @@ -34,7 +34,7 @@ pub const WindowPaddingColor = Config.WindowPaddingColor; // Alternate APIs pub const CAPI = @import("config/CAPI.zig"); -pub const Wasm = if (!builtin.target.isWasm()) struct {} else @import("config/Wasm.zig"); +pub const Wasm = if (!builtin.target.cpu.arch.isWasm()) struct {} else @import("config/Wasm.zig"); test { @import("std").testing.refAllDecls(@This()); diff --git a/src/config/key.zig b/src/config/key.zig index 781b7ec99..5709e2074 100644 --- a/src/config/key.zig +++ b/src/config/key.zig @@ -34,6 +34,8 @@ pub const Key = key: { /// Returns the value type for a key pub fn Value(comptime key: Key) type { const field = comptime field: { + @setEvalBranchQuota(100_000); + const fields = std.meta.fields(Config); for (fields) |field| { if (@field(Key, field.name) == key) { diff --git a/src/datastruct/lru.zig b/src/datastruct/lru.zig index f303158e5..7bf42e82d 100644 --- a/src/datastruct/lru.zig +++ b/src/datastruct/lru.zig @@ -34,7 +34,7 @@ pub fn HashMap( return struct { const Self = @This(); const Map = std.HashMapUnmanaged(K, *Queue.Node, Context, max_load_percentage); - const Queue = std.TailQueue(KV); + const Queue = std.DoublyLinkedList(KV); /// Map to maintain our entries. map: Map, diff --git a/src/terminal/kitty/key.zig b/src/terminal/kitty/key.zig index 2fb779d55..a04bd181a 100644 --- a/src/terminal/kitty/key.zig +++ b/src/terminal/kitty/key.zig @@ -51,7 +51,7 @@ pub const FlagStack = struct { // could send a huge number of pop commands to waste cpu. if (n >= self.flags.len) { self.idx = 0; - self.flags = .{.{}} ** len; + self.flags = .{Flags{}} ** len; return; } diff --git a/src/terminal/style.zig b/src/terminal/style.zig index 6c1f8b608..7f176561b 100644 --- a/src/terminal/style.zig +++ b/src/terminal/style.zig @@ -343,7 +343,7 @@ pub const Set = RefCountedSet( test "Set basic usage" { const testing = std.testing; const alloc = testing.allocator; - const layout = Set.layout(16); + const layout: Set.Layout = .init(16); const buf = try alloc.alignedAlloc(u8, Set.base_align, layout.total_size); defer alloc.free(buf); @@ -397,5 +397,5 @@ test "Set basic usage" { test "Set capacities" { // We want to support at least this many styles without overflowing. - _ = Set.layout(16384); + _ = Set.Layout.init(16384); } diff --git a/src/terminfo/Source.zig b/src/terminfo/Source.zig index 42047e065..8ffd9cabb 100644 --- a/src/terminfo/Source.zig +++ b/src/terminfo/Source.zig @@ -233,10 +233,10 @@ test "encode" { try src.encode(buf_stream.writer()); const expected = - "ghostty|xterm-ghostty|Ghostty\n" ++ + "ghostty|xterm-ghostty|Ghostty,\n" ++ "\tam,\n" ++ "\tccc@,\n" ++ "\tcolors#256,\n" ++ - "\tbel=^G,\n\n"; + "\tbel=^G,\n"; try std.testing.expectEqualStrings(@as([]const u8, expected), buf_stream.getWritten()); }