When completions menu is displayed above cursor, reverse order (#23446)
Considered doing this when previously working on completions menu layout, as it brings the default selection position next to the cursor position, and is generally more symmetrical. With #23445 there is now a more compelling reason, as the "translucent, cropped bottom" display doesn't make sense when displayed above. Release Notes: - N/A
This commit is contained in:
parent
1769bc957b
commit
2f1af2ab69
5 changed files with 163 additions and 56 deletions
|
@ -5246,11 +5246,12 @@ impl Editor {
|
|||
&self,
|
||||
style: &EditorStyle,
|
||||
max_height_in_lines: u32,
|
||||
y_flipped: bool,
|
||||
cx: &mut ViewContext<Editor>,
|
||||
) -> Option<AnyElement> {
|
||||
self.context_menu.borrow().as_ref().and_then(|menu| {
|
||||
if menu.visible() {
|
||||
Some(menu.render(style, max_height_in_lines, cx))
|
||||
Some(menu.render(style, max_height_in_lines, y_flipped, cx))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue