Do not dismiss buffer search when any modal is present
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
parent
a579ef17d7
commit
8b71b1d07b
3 changed files with 17 additions and 4 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue