Skip to content

Commit

Permalink
⬇️ rollback the term grid to 0.1
Browse files Browse the repository at this point in the history
we should consider find another alternative

Signed-off-by: Wei Zhang <[email protected]>
  • Loading branch information
zwpaper committed Mar 25, 2024
1 parent 16181df commit 1de5341
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 1 addition & 4 deletions src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
});
}
}
Expand Down Expand Up @@ -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,
});
}
}
Expand Down Expand Up @@ -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,
});
}

Expand Down

0 comments on commit 1de5341

Please sign in to comment.