From b2db7546b8129fde90f18da9d0e95c8d2a0e66b6 Mon Sep 17 00:00:00 2001 From: Eddie Antonio Santos Date: Tue, 16 Apr 2019 10:22:39 -0600 Subject: [PATCH] Write 'no suggestions' faintly. --- common/test/predictive-text/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/test/predictive-text/index.js b/common/test/predictive-text/index.js index e906647625..0103f3f428 100755 --- a/common/test/predictive-text/index.js +++ b/common/test/predictive-text/index.js @@ -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