Merge pull request #1393 from zed-industries/graceful-exit

Polishing the terminal
This commit is contained in:
Mikayla Maki 2022-07-22 13:59:13 -07:00 committed by GitHub
commit 8c1d4d877f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1932 additions and 1561 deletions

View file

@ -1223,8 +1223,10 @@ impl Workspace {
}
}
pub fn modal(&self) -> Option<&AnyViewHandle> {
self.modal.as_ref()
pub fn modal<V: 'static + View>(&self) -> Option<ViewHandle<V>> {
self.modal
.as_ref()
.and_then(|modal| modal.clone().downcast::<V>())
}
pub fn dismiss_modal(&mut self, cx: &mut ViewContext<Self>) {