Commit 1ef014194e7d93bca26ceabad3967ab1af8f31b9

antirez 2010-03-22T02:30:34

Ctrl-h problem fixed

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/linenoise.c b/linenoise.c
index e2a0871..70b1efb 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -207,6 +207,7 @@ static int linenoisePrompt(int fd, char *buf, size_t buflen, char *prompt) {
             errno = EAGAIN;
             return -1;
         case 127:   /* backspace */
+        case 8:     /* ctrl+h */
             if (pos > 0 && len > 0) {
                 memmove(buf+pos-1,buf+pos,len-pos);
                 pos--;