From 159be00109ebe379dd737f811b9f03fc85454681 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 00:30:16 +0100 Subject: [PATCH] Support delete key in chatbox --- src/hu_stuff.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 8a8a6498d..fbd485b0a 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1170,6 +1170,13 @@ boolean HU_Responder(event_t *ev) memmove(&w_chat[c_input - 1], &w_chat[c_input], strlen(w_chat) - c_input + 1); c_input--; } + else if (c == KEY_DEL) + { + if (CHAT_MUTE || c_input >= strlen(w_chat)) + return true; + + memmove(&w_chat[c_input], &w_chat[c_input + 1], strlen(w_chat) - c_input); + } return true; }