From 94249be76823ad12c41653fb4b85930767145186 Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Tue, 26 Mar 2024 00:05:04 +0800 Subject: :arrow_down: rollback the term grid to 0.1 we should consider find another alternative Signed-off-by: Wei Zhang --- Cargo.lock | 4 ++-- Cargo.toml | 4 +++- src/display.rs | 5 +---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68b9371..059f83e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1167,9 +1167,9 @@ dependencies = [ [[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", ] diff --git a/Cargo.toml b/Cargo.toml index d42664c..8722a9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,9 @@ crossterm = { version = "0.27.0", features = ["serde"] } dirs = "5" libc = "0.2.*" human-sort = "0.2.2" -term_grid = "0.2" +# should stick to 0.1, the 0.2 needs some adaptation +# check https://github.com/lsd-rs/lsd/issues/1014 +term_grid = "0.1" terminal_size = "0.3" thiserror = "1.0" sys-locale = "0.3" diff --git a/src/display.rs b/src/display.rs index da4c897..72515f6 100644 --- a/src/display.rs +++ b/src/display.rs @@ -6,7 +6,7 @@ use crate::icon::Icons; use crate::meta::name::DisplayOption; use crate::meta::{FileType, Meta}; use std::collections::HashMap; -use term_grid::{Alignment, Cell, Direction, Filling, Grid, GridOptions}; +use term_grid::{Cell, Direction, Filling, Grid, GridOptions}; use terminal_size::terminal_size; use unicode_width::UnicodeWidthStr; @@ -130,7 +130,6 @@ fn inner_display_grid( cells.push(Cell { width: get_visible_width(&block, flags.hyperlink == HyperlinkOption::Always), contents: block, - alignment: Alignment::Left, }); } } @@ -217,7 +216,6 @@ fn add_header(flags: &Flags, cells: &[Cell], grid: &mut Grid) { grid.add(Cell { width: widths[idx], contents: underlined_header, - alignment: Alignment::Left, }); } } @@ -261,7 +259,6 @@ fn inner_display_tree( cells.push(Cell { width: get_visible_width(&block, flags.hyperlink == HyperlinkOption::Always), contents: block, - alignment: Alignment::Left, }); } -- cgit v1.2.3