summaryrefslogtreecommitdiff
path: root/src/inspector
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-08-20 12:06:09 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-08-20 12:38:29 -0700
commit131f170f8985cc89c960a02b1b3aae8f3ad9e7a5 (patch)
tree4677f4ebc0641cac48502108085f24557f57c8c7 /src/inspector
parentb3a80f2e47200c1325fe8f55ef55986f41c68fff (diff)
terminal: change OSC parser to explicit init to set undefined
This works around: https://github.com/ziglang/zig/issues/19148 This lets our `test-valgrind` command catch some issues. We'll have to follow this pattern in more places but I want to do it incrementally so things keep passing. I **do not** want to blindly follow this pattern everywhere. I want to start by focusing in only on the structs that set `undefined` as default fields that we're also about to test in isolation with Valgrind. Its just too much noise otherwise and not a general style I'm sure of; it's worth it for Valgrind though.
Diffstat (limited to 'src/inspector')
-rw-r--r--src/inspector/Inspector.zig11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/inspector/Inspector.zig b/src/inspector/Inspector.zig
index d3e7fcaaa..27abb8657 100644
--- a/src/inspector/Inspector.zig
+++ b/src/inspector/Inspector.zig
@@ -172,13 +172,10 @@ pub fn init(surface: *Surface) !Inspector {
.surface = surface,
.key_events = key_buf,
.vt_events = vt_events,
- .vt_stream = .{
- .handler = vt_handler,
- .parser = .{
- .osc_parser = .{
- .alloc = surface.alloc,
- },
- },
+ .vt_stream = stream: {
+ var s: inspector.termio.Stream = .init(vt_handler);
+ s.parser.osc_parser.alloc = surface.alloc;
+ break :stream s;
},
};
}