mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
fix(cli/tools/repl): dont highlight candidate when completion is list (#11697)
This commit is contained in:
parent
ed19e32d98
commit
b8cfc95470
1 changed files with 6 additions and 2 deletions
|
@ -290,10 +290,14 @@ impl Highlighter for EditorHelper {
|
||||||
fn highlight_candidate<'c>(
|
fn highlight_candidate<'c>(
|
||||||
&self,
|
&self,
|
||||||
candidate: &'c str,
|
candidate: &'c str,
|
||||||
_completion: rustyline::CompletionType,
|
completion: rustyline::CompletionType,
|
||||||
) -> Cow<'c, str> {
|
) -> Cow<'c, str> {
|
||||||
|
if completion == CompletionType::List {
|
||||||
|
candidate.into()
|
||||||
|
} else {
|
||||||
self.highlight(candidate, 0)
|
self.highlight(candidate, 0)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn highlight_char(&self, line: &str, _: usize) -> bool {
|
fn highlight_char(&self, line: &str, _: usize) -> bool {
|
||||||
!line.is_empty()
|
!line.is_empty()
|
||||||
|
|
Loading…
Reference in a new issue