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 Picker { log::info!("highlighting picker item failed"); return; }; - let Some(Overlay { - content: picker, .. - }) = compositor.find::>() + let picker = match compositor.find::>() { + Some(Overlay { content, .. }) => Some(content), + None => compositor + .find::>>() + .map(|overlay| &mut overlay.content.file_picker), + }; + let Some(picker) = picker else { log::info!("picker closed before syntax highlighting finished"); return;