]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
chat: fixed CTRL+ALT+u/l clear line not working
authornyov <nyov@nexnode.net>
Tue, 6 Dec 2011 14:05:15 +0000 (15:05 +0100)
committernyov <nyov@nexnode.net>
Tue, 6 Dec 2011 14:05:15 +0000 (15:05 +0100)
keys.c

diff --git a/keys.c b/keys.c
index 1413821d4ed352d12c1c9043ba754de9e377ec8e..fa77ce9e1eadfccd5e5ceefabc562d3e6711a074 100644 (file)
--- 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