Fix notebook cell-height when soft-wrapping lines (#19933)
This commit is contained in:
parent
d49cd0019f
commit
83e2889d63
1 changed files with 1 additions and 4 deletions
|
@ -553,9 +553,6 @@ impl RunnableCell for CodeCell {
|
|||
|
||||
impl Render for CodeCell {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
let lines = self.source.lines().count();
|
||||
let height = lines as f32 * cx.line_height();
|
||||
|
||||
v_flex()
|
||||
.size_full()
|
||||
// TODO: Move base cell render into trait impl so we don't have to repeat this
|
||||
|
@ -582,7 +579,7 @@ impl Render for CodeCell {
|
|||
.border_1()
|
||||
.border_color(cx.theme().colors().border)
|
||||
.bg(cx.theme().colors().editor_background)
|
||||
.child(div().h(height).w_full().child(self.editor.clone())),
|
||||
.child(div().w_full().child(self.editor.clone())),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue