1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

fix(cli/tools/repl): dont highlight candidate when completion is list (#11697)

This commit is contained in:
Casper Beyer 2021-08-14 16:19:30 +08:00 committed by GitHub
parent ed19e32d98
commit b8cfc95470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {