Dispatch editor events on the autocomplete list
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
6da01eac9b
commit
16c0baced6
1 changed files with 8 additions and 2 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue