mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 18:04:52 +00:00
Minor update to linenoise
This commit is contained in:
parent
b2cc45bfbc
commit
c54afb6d0d
6
deps/linenoise/linenoise.c
vendored
6
deps/linenoise/linenoise.c
vendored
@ -243,10 +243,14 @@ static int completeLine(int fd, const char *prompt, char *buf, size_t buflen, si
|
|||||||
if (i == lc.len) beep();
|
if (i == lc.len) beep();
|
||||||
break;
|
break;
|
||||||
case 27: /* escape */
|
case 27: /* escape */
|
||||||
|
/* Re-show original buffer */
|
||||||
|
if (i < lc.len) {
|
||||||
|
refreshLine(fd,prompt,buf,*len,*pos,cols);
|
||||||
|
}
|
||||||
stop = 1;
|
stop = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* update buffer and return */
|
/* Update buffer and return */
|
||||||
if (i < lc.len) {
|
if (i < lc.len) {
|
||||||
nwritten = snprintf(buf,buflen,"%s",lc.cvec[i]);
|
nwritten = snprintf(buf,buflen,"%s",lc.cvec[i]);
|
||||||
*len = *pos = nwritten;
|
*len = *pos = nwritten;
|
||||||
|
Loading…
Reference in New Issue
Block a user