From 5dc96fdbf5615d45987a66df10a039944fd9e3ec Mon Sep 17 00:00:00 2001 From: nyov Date: Tue, 6 Dec 2011 15:05:15 +0100 Subject: [PATCH] chat: fixed CTRL+ALT+u/l clear line not working --- keys.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/keys.c b/keys.c index 1413821d..fa77ce9e 100644 --- a/keys.c +++ b/keys.c @@ -1242,7 +1242,14 @@ Key_Message (int key, int unicode) // chat has CTRL for special chars, console functions need to use CTRL+ALT here char vabuf[1024]; - if (key == 'l' && keydown[K_CTRL] && keydown[K_ALT]) // no screen to clear, do same as ctrl+u (clear history?) + if (key == 'l' && keydown[K_CTRL] && keydown[K_ALT]) // no screen to clear, clear line like ctrl+u + { + // clear line + chat_bufferpos = 0; + chat_buffer[0] = 0; + return; + } + if (key == 'u' && keydown[K_CTRL] && keydown[K_ALT]) // like vi/readline ^u: delete currently edited line { // clear line -- 2.39.2