Skip to content

Commit

Permalink
print_wrapped_text: fix output for negative indent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Mar 2, 2007
1 parent 3d84df4 commit 6227382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ int print_wrapped_text(const char *text, int indent, int indent2, int width)
}
else {
putchar('\n');
text = bol = space + 1;
text = bol = space + isspace(*space);
space = NULL;
w = indent = indent2;
}
Expand Down

0 comments on commit 6227382

Please sign in to comment.