diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2000-06-06 12:10:07 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2000-06-06 12:10:07 +0000 |
| commit | 6cd5adff753df6f3b3fba241d8b59340256d9e60 (patch) | |
| tree | 4b480dfd1af1c6233a058abece92b043b028e911 /bin | |
| parent | aaf8e0820547d57210b03321440f952ba1e5dc10 (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/ls/print.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 596825c7d7d8a..ec4deb519a004 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -241,6 +241,19 @@ printcol(dp) dp->s_block); if ((base += numrows) >= num) break; +#ifdef COLORLS + /* + * We can't put tabs and color sequences together: + * column number will be incremented incorrectly + * for "stty oxtabs" mode. + */ + if (f_color) + while ((cnt = (chcnt + 1)) <= endcol) { + (void)putchar(' '); + chcnt = cnt; + } + else +#endif while ((cnt = ((chcnt + tabwidth) & ~(tabwidth - 1))) <= endcol){ (void)putchar(f_notabs ? ' ' : '\t'); |
