чување eaee14bfe3ec4180e1c74f6a335d2810aa03d55b
родитељ 526ce34cdc692679ce3e743059b03e258856a819
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Sat, 20 Feb 2021 19:30:58 +0100
Bugfix regarding test/ls-multicolumn.sh and test/cp-help.sh
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 2, додавања: 6(+), брисања: 2(-)
diff --git a/table.1.in b/table.1.in
@@ -198,7 +198,8 @@ Like the above, but only permissions and file names are printed in a narrow
table
.
.CDS 4
-$ LC_ALL=C ls -l | tail -n +2 | awk '{ print $1 " " $9 }' | table -d ' ' -c 30 -n
+$ LC_ALL=C ls -l | tail -n +2 | awk '{ print $1 " " $9 }' \\
+ | table -d ' ' -c 30 -n
.CDE
.
.SH BUGS
diff --git a/table.c b/table.c
@@ -611,7 +611,8 @@ main(int argc, char** argv)
pline++;
colno++;
}
- else if (uch == delimiter && !quote)
+ else if (uch == delimiter && !quote
+ && current_table_column < table_columns-1)
{
if (handle_ansi && lineno == 0)
printf("%s", ANSI_SGR_BOLD_OFF);
@@ -663,6 +664,8 @@ main(int argc, char** argv)
current_rune_column++;
}
printf("%s", table_inner_symbols[current_inner_symbol_set][1]);
+ column_start++;
+ column_start += *(format+current_table_column);
current_table_column++;
current_rune_column++;
}