MFC: 1.17: Unbreak column(1) by jumping to the next column
instead of always skipping it.
This commit is contained in:
parent
46f8d04086
commit
0642e45d0d
@ -141,7 +141,7 @@ main(int argc, char **argv)
|
||||
if (!entries)
|
||||
exit(eval);
|
||||
|
||||
maxlength = roundup(maxlength + TAB, TAB);
|
||||
maxlength = roundup(maxlength + 1, TAB);
|
||||
if (tflag)
|
||||
maketbl();
|
||||
else if (maxlength >= termwidth)
|
||||
@ -171,7 +171,7 @@ c_columnate(void)
|
||||
endcol = maxlength;
|
||||
putwchar('\n');
|
||||
} else {
|
||||
while ((cnt = roundup(chcnt + TAB, TAB)) <= endcol) {
|
||||
while ((cnt = roundup(chcnt + 1, TAB)) <= endcol) {
|
||||
(void)putwchar('\t');
|
||||
chcnt = cnt;
|
||||
}
|
||||
@ -199,7 +199,7 @@ r_columnate(void)
|
||||
chcnt += width(list[base]);
|
||||
if ((base += numrows) >= entries)
|
||||
break;
|
||||
while ((cnt = roundup(chcnt + TAB, TAB)) <= endcol) {
|
||||
while ((cnt = roundup(chcnt + 1, TAB)) <= endcol) {
|
||||
(void)putwchar('\t');
|
||||
chcnt = cnt;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user