From df1c4d61a0e19754b75e882d16323605ebb108b6 Mon Sep 17 00:00:00 2001 From: nyov Date: Mon, 12 Mar 2012 11:42:14 +0100 Subject: [PATCH] chat: we have history now, fix CTRL+a/e, CTRL+HOME/END to behave accordingly --- keys.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; } } -- 2.39.2