neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 225c8aba3171156fb917abe043ea55797e2cc1f9
parent b1e172acca870e7999f2d2d917db7b4c42aa05b3
Author: Julius Plenz <plenz@cis.fu-berlin.de>
Date:   Thu, 15 Nov 2012 17:35:06 +0100

ssdiff: correctly manage tab expansion

Previously, replace_tabs("foo\tbar") would become "        foobar".

Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Diffstat:
Mui-ssdiff.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 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; }