aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/menu.rs10
-rw-r--r--helix-term/src/ui/picker.rs10
-rw-r--r--helix-term/src/ui/popup.rs10
-rw-r--r--helix-term/src/ui/prompt.rs10
4 files changed, 16 insertions, 24 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index d055d0d0..f9bfdd35 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -142,12 +142,10 @@ impl<T: 'static> Component for Menu<T> {
_ => return EventResult::Ignored,
};
- let close_fn = EventResult::Consumed(Some(Box::new(
- |compositor: &mut Compositor, editor: &mut Editor| {
- // remove the layer
- compositor.pop();
- },
- )));
+ let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor| {
+ // remove the layer
+ compositor.pop();
+ })));
match event {
// esc or ctrl-c aborts the completion and closes the menu
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index 73cbf07f..6d77bf1d 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -126,12 +126,10 @@ impl<T: 'static> Component for Picker<T> {
_ => return EventResult::Ignored,
};
- let close_fn = EventResult::Consumed(Some(Box::new(
- |compositor: &mut Compositor, editor: &mut Editor| {
- // remove the layer
- compositor.pop();
- },
- )));
+ let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor| {
+ // remove the layer
+ compositor.pop();
+ })));
match key_event {
KeyEvent {
diff --git a/helix-term/src/ui/popup.rs b/helix-term/src/ui/popup.rs
index 44e79c4f..7ce7166c 100644
--- a/helix-term/src/ui/popup.rs
+++ b/helix-term/src/ui/popup.rs
@@ -66,12 +66,10 @@ impl<T: Component> Component for Popup<T> {
_ => return EventResult::Ignored,
};
- let close_fn = EventResult::Consumed(Some(Box::new(
- |compositor: &mut Compositor, editor: &mut Editor| {
- // remove the layer
- compositor.pop();
- },
- )));
+ let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor| {
+ // remove the layer
+ compositor.pop();
+ })));
match key {
// esc or ctrl-c aborts the completion and closes the menu
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 0c2c1d8a..b09b8e14 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -211,12 +211,10 @@ impl Component for Prompt {
_ => return EventResult::Ignored,
};
- let close_fn = EventResult::Consumed(Some(Box::new(
- |compositor: &mut Compositor, editor: &mut Editor| {
- // remove the layer
- compositor.pop();
- },
- )));
+ let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor| {
+ // remove the layer
+ compositor.pop();
+ })));
match event {
// char or shift char