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, &mut self,
event: &Event, event: &Event,
_: RectF, _: RectF,
layout: &mut Self::LayoutState, layout: &mut LayoutState,
paint: &mut Self::PaintState, paint: &mut PaintState,
cx: &mut EventContext, cx: &mut EventContext,
) -> bool { ) -> bool {
if let Some((_, completion_list)) = &mut layout.completions {
if completion_list.dispatch_event(event, cx) {
return true;
}
}
match event { match event {
Event::LeftMouseDown { Event::LeftMouseDown {
position, position,