Autocomplete mentions (#4171)

Release Notes:

- Added autocomplete for @-mentions in the chat panel.
This commit is contained in:
Max Brunsfeld
2024-01-19 17:03:56 -08:00
committed by GitHub
8 changed files with 393 additions and 242 deletions
+7 -1
View File
@@ -2130,7 +2130,13 @@ impl EditorElement {
if let Some(newest_selection_head) = newest_selection_head {
if (start_row..end_row).contains(&newest_selection_head.row()) {
if editor.context_menu_visible() {
let max_height = (12. * line_height).min((bounds.size.height - line_height) / 2.);
let max_height = cmp::min(
12. * line_height,
cmp::max(
3. * line_height,
(bounds.size.height - line_height) / 2.,
)
);
context_menu =
editor.render_context_menu(newest_selection_head, &self.style, max_height, cx);
}