Skip to content

Commit

Permalink
repl: Apply border for error output on left (#16334)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk authored Aug 16, 2024
1 parent 40d97fd commit f7f5a25
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions crates/repl/src/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
}
Expand Down

0 comments on commit f7f5a25

Please sign in to comment.