fix masking input when there is no hintsCallback

from orig commit ec5e4e8
This commit is contained in:
Данила Горнушко 2023-11-22 21:08:37 +03:00
parent f19803a5fa
commit d64bc6bd87

View file

@ -593,7 +593,8 @@ int linenoiseEditInsert(struct linenoiseState *l, char c) {
if ((!mlmode && l->plen+l->len < l->cols && !hintsCallback)) {
/* Avoid a full update of the line in the
* trivial case. */
if (fwrite(&c,1,1,stdout) == -1) return -1;
char d = (maskmode==1) ? '*' : c;
if (fwrite(&d,1,1,stdout) == -1) return -1;
} else {
refreshLine(l);
}