Write 'no suggestions' faintly.

This commit is contained in:
Eddie Antonio Santos 2019-04-16 10:22:39 -06:00
parent 979746d02c
commit b2db7546b8
No known key found for this signature in database
GPG key ID: DD411EA4D9509D87

View file

@ -32,6 +32,7 @@ const ANSI = {
SAVE_CURSOR_POSITION: CSI + 's', // Remembers the current cursor position.
RESTORE_CURSOR_POSITION: CSI + 'u', // Moves the cursor to the previously stored position.
BOLD: CSI + '1m', // Set bold text.
FAINT: CSI + '2m', // Set "faint" text.
REVERSE_VIDEO: CSI + '7m', // Invert the text colour (swap background and foreground colours).
NORMAL_VIDEO: CSI + '27m', // Uninvert the text colour (swap background and foreground colours).
NORMAL: CSI + 'm', // Set all graphics renditions attributes off.
@ -273,7 +274,7 @@ async function asyncRepl(modelFile) {
process.stdout.write(ANSI.CURSOR_NEXT_LINE + ANSI.ERASE_IN_LINE());
if (!suggestions || suggestions.length === 0) {
process.stdout.write(' no suggestions ');
process.stdout.write(`${ANSI.FAINT}no suggestions${ANSI.NORMAL}`);
} else {
// Format the displayed suggestions.
let line = suggestions