Fix mistake.
This commit is contained in:
parent
f2d75f7abd
commit
9e67525650
2 changed files with 6 additions and 5 deletions
|
|
@ -39,10 +39,9 @@ pub use webview_story::WebViewStory;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions, div, prelude::FluentBuilder as _, px, AnyView, AppContext, Div, EventEmitter,
|
actions, div, prelude::FluentBuilder as _, px, AnyView, AppContext, Div, EventEmitter,
|
||||||
FocusableView, InteractiveElement, IntoElement, ParentElement, Pixels, Render, SharedString,
|
FocusableView, InteractiveElement, IntoElement, ParentElement, Pixels, Render, SharedString,
|
||||||
StatefulInteractiveElement, Styled as _, Task, View, ViewContext, VisualContext, WindowContext,
|
StatefulInteractiveElement, Styled as _, View, ViewContext, VisualContext, WindowContext,
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::Result;
|
|
||||||
use ui::{
|
use ui::{
|
||||||
divider::Divider,
|
divider::Divider,
|
||||||
dock::{Panel, PanelEvent, TabPanel},
|
dock::{Panel, PanelEvent, TabPanel},
|
||||||
|
|
|
||||||
|
|
@ -128,11 +128,13 @@ impl TabPanel {
|
||||||
size: Option<Pixels>,
|
size: Option<Pixels>,
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) {
|
) {
|
||||||
self.will_split_placement = Some(placement);
|
|
||||||
cx.spawn(|view, mut cx| async move {
|
cx.spawn(|view, mut cx| async move {
|
||||||
cx.update(|cx| {
|
cx.update(|cx| {
|
||||||
view.update(cx, |view, cx| view.split_panel(panel, placement, size, cx))
|
view.update(cx, |view, cx| {
|
||||||
.ok()
|
view.will_split_placement = Some(placement);
|
||||||
|
view.split_panel(panel, placement, size, cx)
|
||||||
|
})
|
||||||
|
.ok()
|
||||||
})
|
})
|
||||||
.ok()
|
.ok()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue