fix syntax highlights in dynamic picker (#8206)

pull/8222/head
Pascal Kuthe 1 year ago committed by GitHub
parent 14401ff75b
commit eb9c37844c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -474,9 +474,13 @@ impl<T: Item + 'static> Picker<T> {
log::info!("highlighting picker item failed"); log::info!("highlighting picker item failed");
return; return;
}; };
let Some(Overlay { let picker = match compositor.find::<Overlay<Self>>() {
content: picker, .. Some(Overlay { content, .. }) => Some(content),
}) = compositor.find::<Overlay<Self>>() None => compositor
.find::<Overlay<DynamicPicker<T>>>()
.map(|overlay| &mut overlay.content.file_picker),
};
let Some(picker) = picker
else { else {
log::info!("picker closed before syntax highlighting finished"); log::info!("picker closed before syntax highlighting finished");
return; return;

Loading…
Cancel
Save