diff --git a/src/Surface.zig b/src/Surface.zig index c28fbd2f3..fcf224b0a 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -4872,10 +4872,10 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool }, .text => |data| { - // For text we always allocate just because its easier to - // handle all cases that way. - const buf = try self.alloc.alloc(u8, data.len); - defer self.alloc.free(buf); + var stack = std.heap.stackFallback(256, self.alloc); + const alloc = stack.get(); + const buf = try alloc.alloc(u8, data.len); + defer alloc.free(buf); const text = configpkg.string.parse(buf, data) catch |err| { log.warn( "error parsing text binding text={s} err={}",