diff options
author | Mattias Andrée <m@maandree.se> | 2025-02-19 23:06:02 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-02-19 23:06:02 +0100 |
commit | 24ebd3c309c5d6cad63bbf1b40de8c17aead0366 (patch) | |
tree | 7deab3ddadf241ccfaefc31e65916b6036689285 /libterminput_read.c | |
parent | Add tests for new escape sequences (diff) | |
download | libterminput-24ebd3c309c5d6cad63bbf1b40de8c17aead0366.tar.gz libterminput-24ebd3c309c5d6cad63bbf1b40de8c17aead0366.tar.bz2 libterminput-24ebd3c309c5d6cad63bbf1b40de8c17aead0366.tar.xz |
Add state marshalling and unmarshalling functions
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libterminput_read.c')
-rw-r--r-- | libterminput_read.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libterminput_read.c b/libterminput_read.c index 42bb710..9324573 100644 --- a/libterminput_read.c +++ b/libterminput_read.c @@ -74,6 +74,8 @@ again: if (ctx->meta > 1) input->keypress.mods |= LIBTERMINPUT_META; ctx->queued = 1; + input->type = LIBTERMINPUT_NONE; + return 1; } goto none; } @@ -117,7 +119,8 @@ again: if (ctx->meta > 1) input->keypress.mods |= LIBTERMINPUT_META; ctx->queued = 1; - goto none; + input->type = LIBTERMINPUT_NONE; + return 1; } else if (ctx->key[0] == '[' && ctx->key[1] == 'M' && (ctx->flags & LIBTERMINPUT_DECSET_1005)) { ctx->mouse_tracking = 1; n = ctx->stored_tail; @@ -188,6 +191,6 @@ again: return 1; none: - input->type = LIBTERMINPUT_NONE; + NOTHING(input); return 1; } |