commit | a64257a8d27a1764ae2f100a989ba43ca552b64f | [log] [tgz] |
---|---|---|
author | antirez <antirez@gmail.com> | Tue Apr 12 18:44:46 2016 +0200 |
committer | antirez <antirez@gmail.com> | Tue Apr 12 18:44:46 2016 +0200 |
tree | de9919d7d2d628a47a8fb32283c4854c9c551f66 | |
parent | 24c52baad615d6de8a771c74ab1c226cb9db397f [diff] |
Hints: when only bold is set, use color 37 (white).
diff --git a/linenoise.c b/linenoise.c index 47ab864..368cd05 100644 --- a/linenoise.c +++ b/linenoise.c
@@ -481,6 +481,7 @@ int hintlen = strlen(hint); int hintmaxlen = l->cols-(plen+l->len); if (hintlen > hintmaxlen) hintlen = hintmaxlen; + if (bold == 1 && color == -1) color = 37; if (color != -1 || bold != 0) snprintf(seq,64,"\033[%d;%d;49m",bold,color); abAppend(ab,seq,strlen(seq));