aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-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 a8411f53..94a69b0d 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -474,9 +474,13 @@ impl<T: Item + 'static> Picker<T> {
log::info!("highlighting picker item failed");
return;
};
- let Some(Overlay {
- content: picker, ..
- }) = compositor.find::<Overlay<Self>>()
+ let picker = match compositor.find::<Overlay<Self>>() {
+ Some(Overlay { content, .. }) => Some(content),
+ None => compositor
+ .find::<Overlay<DynamicPicker<T>>>()
+ .map(|overlay| &mut overlay.content.file_picker),
+ };
+ let Some(picker) = picker
else {
log::info!("picker closed before syntax highlighting finished");
return;