summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/colorls/files/patch-aa27
1 files changed, 27 insertions, 0 deletions
diff --git a/misc/colorls/files/patch-aa b/misc/colorls/files/patch-aa
index bcbeb7ad16e0..f079ac2ba0f6 100644
--- a/misc/colorls/files/patch-aa
+++ b/misc/colorls/files/patch-aa
@@ -109,6 +109,33 @@
printlink(p);
(void)putchar('\n');
}
+@@ -190,10 +214,22 @@
+ dp->s_block);
+ if ((base += numrows) >= num)
+ break;
+- while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol){
+- (void)putchar('\t');
+- chcnt = cnt;
+- }
++
++ /*
++ * some terminals get confused if we mix tabs
++ * with color sequences
++ */
++ if (f_color)
++ for (cnt = chcnt ; cnt <= endcol ; cnt++) {
++ (void)putchar(' ');
++ chcnt = cnt;
++ }
++ else
++ while ((cnt = ((chcnt + TAB) & ~(TAB - 1)))
++ <= endcol) {
++ (void)putchar('\t');
++ chcnt = cnt;
++ }
+ endcol += colwidth;
+ }
+ (void)putchar('\n');
@@ -217,9 +241,13 @@
if (f_size)
chcnt += printf("%*qd ",