summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/ui/picker.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index d161f786..c357c6d6 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -269,10 +269,8 @@ impl<T: Item + 'static> FilePicker<T> {
EventResult::Consumed(callback)
}
-}
-impl<T: Item + 'static> Component for FilePicker<T> {
- fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
+ fn render_picker(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
// +---------+ +---------+
// |prompt | |preview |
// +---------+ | |
@@ -416,6 +414,12 @@ impl<T: Item + 'static> Component for FilePicker<T> {
}
}
+impl<T: Item + 'static> Component for FilePicker<T> {
+ fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
+ self.render_picker(area, surface, cx);
+ }
+}
+
#[derive(PartialEq, Eq, Debug)]
struct PickerMatch {
score: i64,