diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index e7dedaf5..030085af 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -92,7 +92,8 @@ impl menu::Item for CompletionItem { value, .. }) => value, }; - // LSPs which send Color completion items include a 6 digit hex code at the end for the color. The extra 1 digit is for the '#' + // Language servers which send Color completion items tend to include a 6 + // digit hex code at the end for the color. The extra 1 digit is for the '#' text.get(text.len().checked_sub(7)?..) }) .and_then(Color::from_hex)