From mboxrd@z Thu Jan 1 00:00:00 1970 From: plenz at cis.fu-berlin.de (Julius Plenz) Date: Thu, 15 Nov 2012 17:35:06 +0100 Subject: [PATCH v2] bugfix: make ss-diff correctly handle tab expansion In-Reply-To: References: Message-ID: <1352997306-253443-1-git-send-email-plenz@cis.fu-berlin.de> Previously, replace_tabs("foo\tbar") would become " foobar". Signed-off-by: Julius Plenz --- ui-ssdiff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui-ssdiff.c b/ui-ssdiff.c index c54f7a0..6fe2268 100644 --- a/ui-ssdiff.c +++ b/ui-ssdiff.c @@ -138,9 +138,8 @@ static char *replace_tabs(char *line) strcat(result, prev_buf); break; } else { - strcat(result, " "); - strncat(result, spaces, 8 - (strlen(result) % 8)); strncat(result, prev_buf, cur_buf - prev_buf); + strncat(result, spaces, 8 - (strlen(result) % 8)); } prev_buf = cur_buf + 1; } -- 1.7.12.3-zedat