From 498ead286678d7460e70d77d3f1b749f00fc4c80 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Wed, 31 Jul 2013 15:22:43 -0400 Subject: [PATCH] Backspace key should now work on more terminals in toxic. --- chat.c | 2 +- prompt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chat.c b/chat.c index da9ad02..dceb1d7 100644 --- a/chat.c +++ b/chat.c @@ -95,7 +95,7 @@ static void chat_onKey(ToxWindow* self, int key) { ctx->line[0] = '\0'; ctx->pos = 0; } - else if(key == 0x107) { + else if(key == 0x107 || key == 0x8 || key == 0x7f) { if(ctx->pos != 0) { ctx->line[--ctx->pos] = '\0'; } diff --git a/prompt.c b/prompt.c index 62470a2..f1b6e68 100644 --- a/prompt.c +++ b/prompt.c @@ -256,7 +256,7 @@ static void prompt_onKey(ToxWindow* self, int key) { } // BACKSPACE key: Remove one character from line. - else if(key == 0x107) { + else if(key == 0x107 || key == 0x8 || key == 0x7f) { if(prompt_buf_pos != 0) { prompt_buf[--prompt_buf_pos] = 0;