mirror of
https://github.com/nushell/nushell.git
synced 2025-02-18 03:21:05 +01:00
nu-table: Fix wrap logic (#5998)
Adding space may overflow a cell_width. Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
This commit is contained in:
parent
81df42d63b
commit
e4c512e33d
@ -254,8 +254,12 @@ pub fn wrap_content(
|
|||||||
|
|
||||||
for subline in line.sublines {
|
for subline in line.sublines {
|
||||||
if !first {
|
if !first {
|
||||||
current_line_width += 1 + subline.width;
|
current_line_width += subline.width;
|
||||||
current_line.push(' ');
|
|
||||||
|
if current_line_width + 1 < cell_width {
|
||||||
|
current_line_width += 1;
|
||||||
|
current_line.push(' ');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
first = false;
|
first = false;
|
||||||
current_line_width = subline.width;
|
current_line_width = subline.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user