diff options
author | Tim Angus <tim@ngus.net> | 2013-01-17 13:31:30 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 10:58:28 +0100 |
commit | af45b9f4614d7018146e68832de3bccb1c73f7e7 (patch) | |
tree | f563cc4f23e453d7d1fa13e6c71ffcb7e8ec7bcd /src/client | |
parent | 7426441a5bc9c4eaf28a7f64a22df8bdaa71162c (diff) |
Use SDL 2 instead of SDL 1.2
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/cl_keys.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c index 0fbddd23..191d7fe4 100644 --- a/src/client/cl_keys.c +++ b/src/client/cl_keys.c @@ -438,11 +438,19 @@ void Field_KeyDownEvent( field_t *edit, int key ) { switch ( key ) { case K_DEL: if ( edit->cursor < len ) { - memmove( edit->buffer + edit->cursor, + memmove( edit->buffer + edit->cursor, edit->buffer + edit->cursor + 1, len - edit->cursor ); } break; + case K_BACKSPACE: + if ( edit->cursor > 0 ) { + memmove( edit->buffer + edit->cursor - 1, + edit->buffer + edit->cursor, len + 1 - edit->cursor ); + edit->cursor--; + } + break; + case K_RIGHTARROW: if ( edit->cursor < len ) { edit->cursor++; |