mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
formatting fixes
This commit is contained in:
parent
853acccbc2
commit
5aad1ff788
@ -76,7 +76,8 @@ impl View for FileFinder {
|
||||
Container::new(
|
||||
Flex::new(Axis::Vertical)
|
||||
.with_child(
|
||||
ChildView::new(&self.query_editor).contained()
|
||||
ChildView::new(&self.query_editor)
|
||||
.contained()
|
||||
.with_style(settings.theme.selector.input_editor.container)
|
||||
.boxed(),
|
||||
)
|
||||
|
@ -218,7 +218,8 @@ impl ThemeSelector {
|
||||
))
|
||||
};
|
||||
|
||||
self.selected_index = self.selected_index
|
||||
self.selected_index = self
|
||||
.selected_index
|
||||
.min(self.matches.len().saturating_sub(1));
|
||||
|
||||
cx.notify();
|
||||
@ -341,7 +342,8 @@ impl View for ThemeSelector {
|
||||
Container::new(
|
||||
Flex::new(Axis::Vertical)
|
||||
.with_child(
|
||||
ChildView::new(&self.query_editor).contained()
|
||||
ChildView::new(&self.query_editor)
|
||||
.contained()
|
||||
.with_style(settings.theme.selector.input_editor.container)
|
||||
.boxed(),
|
||||
)
|
||||
|
@ -755,7 +755,11 @@ impl Workspace {
|
||||
}
|
||||
|
||||
// Returns the model that was toggled closed if it was open
|
||||
pub fn toggle_modal<V, F>(&mut self, cx: &mut ViewContext<Self>, add_view: F) -> Option<ViewHandle<V>>
|
||||
pub fn toggle_modal<V, F>(
|
||||
&mut self,
|
||||
cx: &mut ViewContext<Self>,
|
||||
add_view: F,
|
||||
) -> Option<ViewHandle<V>>
|
||||
where
|
||||
V: 'static + View,
|
||||
F: FnOnce(&mut ViewContext<Self>, &mut Self) -> ViewHandle<V>,
|
||||
@ -763,8 +767,7 @@ impl Workspace {
|
||||
cx.notify();
|
||||
// Whatever modal was visible is getting clobbered. If its the same type as V, then return
|
||||
// it. Otherwise, create a new modal and set it as active.
|
||||
let already_open_modal = self.modal.take()
|
||||
.and_then(|modal| modal.downcast::<V>());
|
||||
let already_open_modal = self.modal.take().and_then(|modal| modal.downcast::<V>());
|
||||
if let Some(already_open_modal) = already_open_modal {
|
||||
cx.focus_self();
|
||||
Some(already_open_modal)
|
||||
|
Loading…
Reference in New Issue
Block a user