this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

vxfw(TextField): get a new dupe for onSubmit

+3 -1
+3 -1
src/vxfw/TextField.zig
··· 104 104 return self.checkChanged(ctx); 105 105 } else if (key.matches(vaxis.Key.enter, .{}) or key.matches('j', .{ .ctrl = true })) { 106 106 if (self.onSubmit) |onSubmit| { 107 - try onSubmit(self.userdata, ctx, self.previous_val); 107 + const value = try self.buf.dupe(); 108 + defer self.buf.allocator.free(value); 109 + try onSubmit(self.userdata, ctx, value); 108 110 return ctx.consumeAndRedraw(); 109 111 } 110 112 } else if (key.text) |text| {