Skip to content

Commit 6227382

Browse files
dschoJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d84df4 commit 6227382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utf8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ int print_wrapped_text(const char *text, int indent, int indent2, int width)
268268
}
269269
else {
270270
putchar('\n');
271-
text = bol = space + 1;
271+
text = bol = space + isspace(*space);
272272
space = NULL;
273273
w = indent = indent2;
274274
}

0 commit comments

Comments
 (0)