]> git.lizzy.rs Git - linenoise.git/commitdiff
Ctrl-h problem fixed
authorantirez <antirez@gmail.com>
Mon, 22 Mar 2010 01:30:34 +0000 (02:30 +0100)
committerantirez <antirez@gmail.com>
Mon, 22 Mar 2010 01:30:34 +0000 (02:30 +0100)
linenoise.c

index e2a0871437852f124afb057cfc9aefdeab69098e..70b1efbd17eaa68b1537edf72311c013373ed215 100644 (file)
@@ -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--;