repl: Rely on block decorations to size according to content (#15713)
We no longer have to use line height calculations now that https://github.com/zed-industries/zed/pull/15536 is in. Blocks resize according to their content. This fixes up some of the rendering issues on plaintext outputs as well. Release Notes: - Fix repl plain text output wrapping around and covering editor text (https://github.com/zed-industries/zed/issues/15491, https://github.com/zed-industries/zed/issues/14855)
This commit is contained in:
parent
5c54596027
commit
b6a3556a32
3 changed files with 6 additions and 90 deletions
|
@ -2,7 +2,7 @@ use crate::components::KernelListItem;
|
|||
use crate::KernelStatus;
|
||||
use crate::{
|
||||
kernels::{Kernel, KernelSpecification, RunningKernel},
|
||||
outputs::{ExecutionStatus, ExecutionView, LineHeight as _},
|
||||
outputs::{ExecutionStatus, ExecutionView},
|
||||
};
|
||||
use client::telemetry::Telemetry;
|
||||
use collections::{HashMap, HashSet};
|
||||
|
@ -82,7 +82,8 @@ impl EditorBlock {
|
|||
let invalidation_anchor = buffer.read(cx).read(cx).anchor_before(next_row_start);
|
||||
let block = BlockProperties {
|
||||
position: code_range.end,
|
||||
height: (execution_view.num_lines(cx) + 1) as u32,
|
||||
// Take up at least one height for status, allow the editor to determine the real height based on the content from render
|
||||
height: 1,
|
||||
style: BlockStyle::Sticky,
|
||||
render: Self::create_output_area_renderer(execution_view.clone(), on_close.clone()),
|
||||
disposition: BlockDisposition::Below,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue