From 8cfbaf545ab4215ccc9820ba905f502387d1de1f Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:45:27 +0200 Subject: [PATCH 1/2] config: formatted action should be parsable into the original --- src/input/Binding.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 8c706027a..16f632c53 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -4611,12 +4611,14 @@ test "action: format" { const testing = std.testing; const alloc = testing.allocator; - const a: Action = .{ .text = "👻" }; + const a: Action = .{ .text = "👻Ghostty'\"" }; var buf: std.Io.Writer.Allocating = .init(alloc); defer buf.deinit(); try a.format(&buf.writer); - try testing.expectEqualStrings("text:\\xf0\\x9f\\x91\\xbb", buf.written()); + + const b = try Binding.Action.parse(buf.written()); + try testing.expect(a.equal(b)); } test "action: format set title" { From b67f8ef51d8092ff3aaf52574a89c98f9f46b0ca Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:45:58 +0200 Subject: [PATCH 2/2] config: don't escape Binding.Action.String --- src/input/Binding.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 16f632c53..5b14067db 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -1524,7 +1524,7 @@ pub const Action = union(enum) { const value_info = @typeInfo(Value); switch (Value) { void => {}, - []const u8 => try std.zig.stringEscape(value, writer), + []const u8 => try writer.print("{s}", .{value}), else => switch (value_info) { .@"enum" => try writer.print("{t}", .{value}), .float => try writer.print("{d}", .{value}),