@matheusbsbs / matheus-bagliano / commits / 62273826fe
Fork 0

print_wrapped_text: fix output for negative indent

When providing a negative indent, it means that -indent columns were already printed. Fix a bug where the function ate the first character if already the first word did not fit into the first line. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Mar 2, 2007 at 15:28 UTC 62273826fe977d4c1fa445edf9d0e4ab02274fa2
1 file changed +1 -1
utf8.c
+1 -1
@@ -268,7 +268,7 @@ int print_wrapped_text(const char *text, int indent, int indent2, int width)
268 }
269 else {
270 putchar('\n');
271 - text = bol = space + 1;
271 + text = bol = space + isspace(*space);
272 space = NULL;
273 w = indent = indent2;
274 }