mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
nu_table: Fix truncating logic (#6028)
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
This commit is contained in:
@ -19,4 +19,4 @@ unicode-width = "0.1.8"
|
||||
strip-ansi-escapes = "0.1.1"
|
||||
ansi-str = { git = "https://github.com/zhiburt/ansi-str", rev = "655cd8125a032286082794690c2cc6dc835345b4" }
|
||||
atty = "0.2.14"
|
||||
tabled = { git = "https://github.com/zhiburt/tabled", branch = "master", features = ["color"] }
|
||||
tabled = { git = "https://github.com/zhiburt/tabled", rev = "a7f05c18aa9e5edc004a984051659d0d05b6e594", features = ["color"] }
|
||||
|
@ -305,11 +305,11 @@ impl tabled::TableOption for &TrimStrategyModifier<'_> {
|
||||
w.change(grid)
|
||||
}
|
||||
TrimStrategy::Truncate { suffix } => {
|
||||
let mut w =
|
||||
Width::truncate(self.termwidth).priority::<tabled::width::PriorityMax>();
|
||||
let mut w = Width::truncate(self.termwidth);
|
||||
if let Some(suffix) = suffix {
|
||||
w = w.suffix(suffix);
|
||||
}
|
||||
let mut w = w.priority::<tabled::width::PriorityMax>();
|
||||
|
||||
w.change(grid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user