edit prediction: Fix width of completion item (#23177)
Thorsten Ball
,
Agus
,
Bennet
, and
Antonio
created
Release Notes:
- N/A
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
Change summary
crates/editor/src/code_context_menus.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Detailed changes
@@ -462,7 +462,9 @@ impl CompletionsMenu {
len
}
- CompletionEntry::InlineCompletionHint(hint) => hint.label().chars().count(),
+ CompletionEntry::InlineCompletionHint(hint) => {
+ "Zed AI / ".chars().count() + hint.label().chars().count()
+ }
})
.map(|(ix, _)| ix);
drop(completions);