summaryrefslogtreecommitdiff
path: root/testing/toxic
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-31 15:22:43 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-31 15:22:43 -0400
commit0d5eef4b43f6d936d3e34a2329b7d819e870953c (patch)
tree96d2a02a80274dc66714925e90b5acc7ec024637 /testing/toxic
parent639d1faa5d750d3ed0e23905c7c1c4808e44d269 (diff)
Backspace key should now work on more terminals in toxic.
Diffstat (limited to 'testing/toxic')
-rw-r--r--testing/toxic/chat.c2
-rw-r--r--testing/toxic/prompt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c
index da9ad025..dceb1d7b 100644
--- a/testing/toxic/chat.c
+++ b/testing/toxic/chat.c
@@ -95,7 +95,7 @@ static void chat_onKey(ToxWindow* self, int key) {
95 ctx->line[0] = '\0'; 95 ctx->line[0] = '\0';
96 ctx->pos = 0; 96 ctx->pos = 0;
97 } 97 }
98 else if(key == 0x107) { 98 else if(key == 0x107 || key == 0x8 || key == 0x7f) {
99 if(ctx->pos != 0) { 99 if(ctx->pos != 0) {
100 ctx->line[--ctx->pos] = '\0'; 100 ctx->line[--ctx->pos] = '\0';
101 } 101 }
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c
index 62470a23..f1b6e689 100644
--- a/testing/toxic/prompt.c
+++ b/testing/toxic/prompt.c
@@ -256,7 +256,7 @@ static void prompt_onKey(ToxWindow* self, int key) {
256 } 256 }
257 257
258 // BACKSPACE key: Remove one character from line. 258 // BACKSPACE key: Remove one character from line.
259 else if(key == 0x107) { 259 else if(key == 0x107 || key == 0x8 || key == 0x7f) {
260 260
261 if(prompt_buf_pos != 0) { 261 if(prompt_buf_pos != 0) {
262 prompt_buf[--prompt_buf_pos] = 0; 262 prompt_buf[--prompt_buf_pos] = 0;