From: nyov Date: Tue, 6 Dec 2011 14:05:15 +0000 (+0100) Subject: chat: fixed CTRL+ALT+u/l clear line not working X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5dc96fdbf5615d45987a66df10a039944fd9e3ec;p=xonotic%2Fdarkplaces.git chat: fixed CTRL+ALT+u/l clear line not working --- 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