Browse Source

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>
maint
Johannes Schindelin 18 years ago committed by Junio C Hamano
parent
commit
62273826fe
  1. 2
      utf8.c

2
utf8.c

@ -268,7 +268,7 @@ int print_wrapped_text(const char *text, int indent, int indent2, int width) @@ -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;
}

Loading…
Cancel
Save