mirror of
https://github.com/antirez/linenoise.git
synced 2025-11-16 12:34:48 +00:00
fix masking input when there is no hintsCallback
Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
@@ -669,7 +669,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 (write(l->ofd,&c,1) == -1) return -1;
|
||||
char d = (maskmode==1) ? '*' : c;
|
||||
if (write(l->ofd,&d,1) == -1) return -1;
|
||||
} else {
|
||||
refreshLine(l);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user