config: add string parse, tests

This commit is contained in:
Mitchell Hashimoto
2023-11-24 10:26:55 -08:00
parent 2e02083eef
commit 0e2970bdeb
4 changed files with 76 additions and 35 deletions

View File

@@ -134,7 +134,10 @@ pub const Action = union(enum) {
/// Send an ESC sequence.
esc: []const u8,
// Send the given text. Uses Zig string literal syntax.
// 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.
text: []const u8,
/// Send data to the pty depending on whether cursor key mode is