fix(grid): fixed grid bug

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2023-07-29 17:40:41 +02:00
parent fdc7f00575
commit 064282843c
No known key found for this signature in database
GPG key ID: CDDC792F655251ED
4 changed files with 5 additions and 6 deletions

4
Cargo.lock generated
View file

@ -280,9 +280,9 @@ checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
[[package]]
name = "term_grid"
version = "0.2.0"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7c9eb7705cb3f0fd71d3955b23db6d372142ac139e8c473952c93bf3c3dc4b7"
checksum = "230d3e804faaed5a39b08319efb797783df2fd9671b39b7596490cb486d702cf"
dependencies = [
"unicode-width",
]

View file

@ -28,7 +28,7 @@ natord = "1.0"
num_cpus = "1.10"
number_prefix = "0.4"
scoped_threadpool = "0.1"
term_grid = "0.2.0"
term_grid = "0.1"
terminal_size = "0.1.16"
unicode-width = "0.1"
zoneinfo_compiled = "0.5.1"

View file

@ -49,7 +49,6 @@ impl<'a> Render<'a> {
// with hyperlink escape sequences,
// the actual *contents.width() is larger than actually needed, so we take only the filename
width: filename.bare_width(),
alignment: tg::Alignment::Left,
});
}

View file

@ -262,7 +262,7 @@ impl<'a> Render<'a> {
let cell = grid::Cell {
contents: ANSIStrings(&column[row].contents).to_string(),
width: *column[row].width,
alignment: grid::Alignment::Left,
// alignment: grid::Alignment::Left,
};
grid.add(cell);
@ -276,7 +276,7 @@ impl<'a> Render<'a> {
let cell = grid::Cell {
contents: ANSIStrings(&cell.contents).to_string(),
width: *cell.width,
alignment: grid::Alignment::Left,
// alignment: grid::Alignment::Left,
};
grid.add(cell);