summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1997-01-03 01:34:16 +0000
committerSatoshi Asami <asami@FreeBSD.org>1997-01-03 01:34:16 +0000
commitc264018515f69f3ee3fd439298c4ab8a8c279632 (patch)
treee4301322bb2643352c6749b22012be82b8907b52 /misc
parentAdded a brief explanation about scsh. (diff)
Disable tabs in output when color is used. Now -G should work with
stty oxtabs (aka "-tabs") too. Porblem reported by: jmz, among others
Notes
Notes: svn path=/head/; revision=5176
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 ",