[PATCH 2/2] bugfix: make ss-diff correctly handle tab expansion
Julius Plenz
plenz at cis.fu-berlin.de
Tue Oct 30 15:56:53 CET 2012
Hi,
reading over the patch again, I realize that in the original
behaviour:
> strcat(result, " ");
> strncat(result, spaces, 8 - (strlen(result) % 8));
... a tab is it least two spaces wide (if strlen == 8*n + 7) and up to
nine spaces wide (if strlen == 8*n). This sounds odd, so I'd suggest
the obvious fix of adding (7 - ((strlen(result)-1) % 8) spaces, since
one space is already there.
What do you think?
Julius
More information about the CGit
mailing list