diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-29 20:53:57 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-29 20:53:57 +0100 |
commit | c54afb6d0d9808e38248e55a3220868735aaab44 (patch) | |
tree | 2a9ece654365349dcc800616791d49af07f6ff4c /deps | |
parent | b2cc45bfbc5e8e264ce6c26c7803d2d24d47d340 (diff) | |
download | redis-c54afb6d0d9808e38248e55a3220868735aaab44.tar.gz |
Minor update to linenoise
Diffstat (limited to 'deps')
-rw-r--r-- | deps/linenoise/linenoise.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/linenoise/linenoise.c b/deps/linenoise/linenoise.c index 0ebef2e91..b6f4d4f9b 100644 --- a/deps/linenoise/linenoise.c +++ b/deps/linenoise/linenoise.c @@ -243,10 +243,14 @@ static int completeLine(int fd, const char *prompt, char *buf, size_t buflen, si if (i == lc.len) beep(); break; case 27: /* escape */ + /* Re-show original buffer */ + if (i < lc.len) { + refreshLine(fd,prompt,buf,*len,*pos,cols); + } stop = 1; break; default: - /* update buffer and return */ + /* Update buffer and return */ if (i < lc.len) { nwritten = snprintf(buf,buflen,"%s",lc.cvec[i]); *len = *pos = nwritten; |