repl: Apply border for error output on left (#16334)

This commit is contained in:
Kyle Kelley 2024-08-16 00:31:46 -05:00 committed by GitHub
parent 40d97fd346
commit f7f5a25584
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,17 +257,31 @@ impl ErrorView {
Some(
v_flex()
.w_full()
.px(padding)
.py(padding)
.border_1()
.border_color(theme.status().error_border)
.gap_3()
.child(
h_flex()
.font_weight(FontWeight::BOLD)
.child(format!("{}: {}", self.ename, self.evalue)),
.font_buffer(cx)
.child(
Label::new(format!("{}: ", self.ename.clone()))
// .size(LabelSize::Large)
.color(Color::Error)
.weight(FontWeight::BOLD),
)
.child(
Label::new(self.evalue.clone())
// .size(LabelSize::Large)
.weight(FontWeight::BOLD),
),
)
.child(
div()
.w_full()
.px(padding)
.py(padding)
.border_l_1()
.border_color(theme.status().error_border)
.child(self.traceback.render(cx)),
)
.child(self.traceback.render(cx))
.into_any_element(),
)
}