Ctrl+K support
diff --git a/linenoise.c b/linenoise.c
index f2760eb..2a6bff9 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -259,6 +259,11 @@ static int linenoisePrompt(int fd, char *buf, size_t buflen, char *prompt) {
}
}
break;
+ case 11: /* Ctrl+K, delete from current to end of line. */
+ buf[pos] = '\0';
+ len = pos;
+ refreshLine(fd,prompt,buf,len,pos,cols);
+ break;
}
}
return len;