mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 01:43:47 +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 {
|
||||
if !first {
|
||||
current_line_width += 1 + subline.width;
|
||||
current_line.push(' ');
|
||||
current_line_width += subline.width;
|
||||
|
||||
if current_line_width + 1 < cell_width {
|
||||
current_line_width += 1;
|
||||
current_line.push(' ');
|
||||
}
|
||||
} else {
|
||||
first = false;
|
||||
current_line_width = subline.width;
|
||||
|
Loading…
Reference in New Issue
Block a user