diff options
author | Satoshi Asami <asami@FreeBSD.org> | 1997-01-03 01:34:16 +0000 |
---|---|---|
committer | Satoshi Asami <asami@FreeBSD.org> | 1997-01-03 01:34:16 +0000 |
commit | c264018515f69f3ee3fd439298c4ab8a8c279632 (patch) | |
tree | e4301322bb2643352c6749b22012be82b8907b52 /misc | |
parent | d8d1d7eeb5ca7412c3c218817d1ea99df7f5ae5f (diff) | |
download | freebsd-ports-c264018515f69f3ee3fd439298c4ab8a8c279632.zip |
Disable tabs in output when color is used. Now -G should work with
stty oxtabs (aka "-tabs") too.
Porblem reported by: jmz, among others
Diffstat (limited to 'misc')
-rw-r--r-- | misc/colorls/files/patch-aa | 27 |
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 ", |