v0.2.14 : barres verticales des cadres aux couleurs du theme + commande theme dans le shell (theme liste les themes, theme <name> change a chaud, completion et menu synchronises)

This commit is contained in:
2026-08-16 13:40:51 -04:00
parent 4b0f02a7c4
commit 2bbe45e508
5 changed files with 161 additions and 25 deletions
+11 -2
View File
@@ -153,8 +153,17 @@ impl DataTable {
line.push(right);
line
};
let bar = |s: &str| -> String {
if !color {
return s.to_string();
}
match theme {
Some(t) => t.frame(s),
None => s.to_string(),
}
};
let row_line = |row: &[String], header: bool| -> String {
let mut line = String::from("│");
let mut line = bar("│");
for (i, c) in row.iter().enumerate().take(all_widths.len()) {
line.push(' ');
let cell = fit_cell(c, all_widths[i]);
@@ -168,7 +177,7 @@ impl DataTable {
};
line.push_str(&rendered);
line.push(' ');
line.push('│');
line.push_str(&bar("│"));
}
line
};