cli: Fix multiline patch show description output

This commit is contained in:
Alexis Sellier
2023-03-23 14:43:21 +01:00
parent 6c1e2d0ddd
commit 577a232a68
6 changed files with 76 additions and 4 deletions
+5 -3
View File
@@ -7,9 +7,8 @@ use radicle::cob::patch;
use radicle::git;
use radicle::storage::git::Repository;
use radicle_term::{
label,
table::{Table, TableOptions},
Element, Paint, VStack,
textarea, Element, Paint, VStack,
};
use crate::terminal as term;
@@ -71,7 +70,10 @@ pub fn run(
.border(Some(term::colors::FAINT))
.child(attrs)
.children(if !description.is_empty() {
vec![term::Label::blank(), label(term::format::dim(description))]
vec![
term::Label::blank().boxed(),
textarea(term::format::dim(description)).boxed(),
]
} else {
vec![]
});