Skip to content

Commit

Permalink
edit prediction: Fix width of completion item (#23177)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
4 people authored Jan 15, 2025
1 parent 4a76302 commit b1cfc11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/editor/src/code_context_menus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b1cfc11

Please sign in to comment.