From b8cfc9547023a30df991047e7a32e3e661faecfa Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Sat, 14 Aug 2021 16:19:30 +0800 Subject: fix(cli/tools/repl): dont highlight candidate when completion is list (#11697) --- cli/tools/repl.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cli') diff --git a/cli/tools/repl.rs b/cli/tools/repl.rs index 3de859698..e313d1735 100644 --- a/cli/tools/repl.rs +++ b/cli/tools/repl.rs @@ -290,9 +290,13 @@ impl Highlighter for EditorHelper { fn highlight_candidate<'c>( &self, candidate: &'c str, - _completion: rustyline::CompletionType, + completion: rustyline::CompletionType, ) -> Cow<'c, str> { - self.highlight(candidate, 0) + if completion == CompletionType::List { + candidate.into() + } else { + self.highlight(candidate, 0) + } } fn highlight_char(&self, line: &str, _: usize) -> bool { -- cgit v1.2.3