Dispatch editor events on the autocomplete list

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-01-31 13:15:30 -08:00
parent 6da01eac9b
commit 16c0baced6

View file

@ -981,10 +981,16 @@ impl Element for EditorElement {
&mut self,
event: &Event,
_: RectF,
layout: &mut Self::LayoutState,
paint: &mut Self::PaintState,
layout: &mut LayoutState,
paint: &mut PaintState,
cx: &mut EventContext,
) -> bool {
if let Some((_, completion_list)) = &mut layout.completions {
if completion_list.dispatch_event(event, cx) {
return true;
}
}
match event {
Event::LeftMouseDown {
position,