input: allocate for text bindings

This commit is contained in:
Mitchell Hashimoto
2023-11-24 10:36:43 -08:00
parent 0e2970bdeb
commit 6fc0d2d4a8
2 changed files with 33 additions and 9 deletions

View File

@@ -134,10 +134,10 @@ pub const Action = union(enum) {
/// Send an ESC sequence.
esc: []const u8,
// Send the given text. Uses Zig string literal syntax. The maximum
// length of the string is 128 bytes. This is currently not validated.
// If the text is invalid (i.e. contains an invalid escape sequence),
// the error will currently only show up in logs.
// Send the given text. Uses Zig string literal syntax. This is
// currently not validated. If the text is invalid (i.e. contains
// an invalid escape sequence), the error will currently only show
// up in logs.
text: []const u8,
/// Send data to the pty depending on whether cursor key mode is