From: nyov Date: Mon, 12 Mar 2012 10:42:14 +0000 (+0100) Subject: chat: we have history now, fix CTRL+a/e, CTRL+HOME/END to behave accordingly X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df1c4d61a0e19754b75e882d16323605ebb108b6;p=xonotic%2Fdarkplaces.git chat: we have history now, fix CTRL+a/e, CTRL+HOME/END to behave accordingly --- diff --git a/keys.c b/keys.c index e7b90096..9b6704c8 100644 --- a/keys.c +++ b/keys.c @@ -1742,15 +1742,19 @@ Key_Message (int key, int unicode) if (key == K_HOME /*|| key == K_KP_HOME*/ || (key == 'a' && keydown[K_CTRL])) { - // TODO +CTRL for MsgKey_History_Top() or something - chat_bufferpos = 0; + if (keydown[K_CTRL]) + MsgKey_History_First(); + else + chat_bufferpos = 0; return; } if (key == K_END /*|| key == K_KP_END*/ || (key == 'e' && keydown[K_CTRL])) { - // TODO +CTRL for MsgKey_History_Bottom() or something - chat_bufferpos = (int)strlen(chat_buffer); + if (keydown[K_CTRL]) + MsgKey_History_Last(); + else + chat_bufferpos = (int)strlen(chat_buffer); return; } }