From 24ebd3c309c5d6cad63bbf1b40de8c17aead0366 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 19 Feb 2025 23:06:02 +0100 Subject: Add state marshalling and unmarshalling functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libterminput_read.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libterminput_read.c') 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; } -- cgit v1.2.3-70-g09d2