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
|
@ -1,4 +1,4 @@
|
|||
use crate::outputs::{ExecutionView, LineHeight};
|
||||
use crate::outputs::ExecutionView;
|
||||
use alacritty_terminal::vte::{
|
||||
ansi::{Attr, Color, NamedColor, Rgb},
|
||||
Params, ParamsIter, Parser, Perform,
|
||||
|
@ -7,7 +7,7 @@ use core::iter;
|
|||
use gpui::{font, prelude::*, AnyElement, StyledText, TextRun};
|
||||
use settings::Settings as _;
|
||||
use theme::ThemeSettings;
|
||||
use ui::{div, prelude::*, IntoElement, ViewContext, WindowContext};
|
||||
use ui::{div, prelude::*, IntoElement, ViewContext};
|
||||
|
||||
/// Implements the most basic of terminal output for use by Jupyter outputs
|
||||
/// whether:
|
||||
|
@ -95,12 +95,6 @@ impl TerminalOutput {
|
|||
}
|
||||
}
|
||||
|
||||
impl LineHeight for TerminalOutput {
|
||||
fn num_lines(&self, _cx: &mut WindowContext) -> usize {
|
||||
self.handler.buffer.lines().count().max(1)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
struct AnsiTextRun {
|
||||
len: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue