Use replace blocks for patches (#20605)
Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev> Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
parent
96deabfb78
commit
92613a8904
13 changed files with 925 additions and 918 deletions
|
@ -121,7 +121,7 @@ impl EditorBlock {
|
|||
execution_view: View<ExecutionView>,
|
||||
on_close: CloseBlockFn,
|
||||
) -> RenderBlock {
|
||||
let render = move |cx: &mut BlockContext| {
|
||||
Arc::new(move |cx: &mut BlockContext| {
|
||||
let execution_view = execution_view.clone();
|
||||
let text_style = crate::outputs::plain::text_style(cx);
|
||||
|
||||
|
@ -163,6 +163,7 @@ impl EditorBlock {
|
|||
|
||||
div()
|
||||
.id(cx.block_id)
|
||||
.occlude()
|
||||
.flex()
|
||||
.items_start()
|
||||
.min_h(text_line_height)
|
||||
|
@ -186,9 +187,7 @@ impl EditorBlock {
|
|||
.child(execution_view),
|
||||
)
|
||||
.into_any_element()
|
||||
};
|
||||
|
||||
Box::new(render)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue