From 2c7c599647773221fceacc1633b95e4b614b8af3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 21 Jul 2008 22:57:08 +0000 Subject: unbindall, proper delete key support --- src/client/chat.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/client/chat.cc') diff --git a/src/client/chat.cc b/src/client/chat.cc index 6c3140d..522a675 100644 --- a/src/client/chat.cc +++ b/src/client/chat.cc @@ -173,6 +173,11 @@ void keypressed(unsigned int key) if (input_pos < (*history_pos).size()) input_pos++; break; + case SDLK_DELETE: + if ((*history_pos).size() && input_pos < (*history_pos).size()) { + (*history_pos).erase(input_pos, 1); + } + break; case SDLK_BACKSPACE: if ((*history_pos).size() && input_pos) { (*history_pos).erase(input_pos-1, 1); -- cgit v1.2.3