Skip to content

Commit e04c3a0

Browse files
committed
pop compositor layer when ignoring Enter keypress
1 parent 262d1d7 commit e04c3a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

helix-term/src/ui/menu.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ impl<T: Item + 'static> Component for Menu<T> {
233233
(self.callback_fn)(cx.editor, Some(selection), MenuEvent::Validate);
234234
return close_fn;
235235
} else {
236-
return EventResult::Ignored(None);
236+
return EventResult::Ignored(Some(Box::new(
237+
|compositor: &mut Compositor, _| {
238+
compositor.pop();
239+
},
240+
)));
237241
}
238242
}
239243
// KeyEvent {

0 commit comments

Comments
 (0)