Do not dismiss buffer search when any modal is present
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
co-authored by
Piotr Osiewicz
parent
a579ef17d7
commit
8b71b1d07b
@@ -101,6 +101,10 @@ impl ModalLayer {
|
||||
let active_modal = self.active_modal.as_ref()?;
|
||||
active_modal.modal.view().downcast::<V>().ok()
|
||||
}
|
||||
|
||||
pub fn has_active_modal(&self) -> bool {
|
||||
self.active_modal.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
impl Render for ModalLayer {
|
||||
|
||||
@@ -3383,6 +3383,10 @@ impl Workspace {
|
||||
div
|
||||
}
|
||||
|
||||
pub fn has_active_modal(&self, cx: &WindowContext<'_>) -> bool {
|
||||
self.modal_layer.read(cx).has_active_modal()
|
||||
}
|
||||
|
||||
pub fn active_modal<V: ManagedView + 'static>(
|
||||
&mut self,
|
||||
cx: &ViewContext<Self>,
|
||||
|
||||
Reference in New Issue
Block a user