mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 23:05:49 +01:00
Back out spaces to TABs replace removing for COLORLS
Rewrite corresponding comment to say what happens in reality with oxtabs and current terminal column.
This commit is contained in:
parent
aaf8e08205
commit
6cd5adff75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61334
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user