summaryrefslogtreecommitdiff
path: root/src/termio/Thread.zig
diff options
context:
space:
mode:
authorMitchell Hashimoto <mitchell.hashimoto@gmail.com>2022-11-05 17:37:21 -0700
committerMitchell Hashimoto <mitchell.hashimoto@gmail.com>2022-11-05 19:31:28 -0700
commit95d054b185503e649754640c5f27e3d62b0b9b5a (patch)
tree6490741c6b00115b0ad3b3c3e44a8653931e3e64 /src/termio/Thread.zig
parent8652b2170e202dfc9addd3eef86cb850ae4949ba (diff)
allocate data for paste data if its too large
Diffstat (limited to 'src/termio/Thread.zig')
-rw-r--r--src/termio/Thread.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/termio/Thread.zig b/src/termio/Thread.zig
index 7201101d7..9859138a1 100644
--- a/src/termio/Thread.zig
+++ b/src/termio/Thread.zig
@@ -164,6 +164,10 @@ fn drainMailbox(self: *Thread) !void {
.resize => |v| try self.impl.resize(v.grid_size, v.screen_size),
.write_small => |v| try self.impl.queueWrite(v.data[0..v.len]),
.write_stable => |v| try self.impl.queueWrite(v),
+ .write_alloc => |v| {
+ defer v.alloc.free(v.data);
+ try self.impl.queueWrite(v.data);
+ },
}
}
}