Index: joe-4.0/joe/uformat.c =================================================================== --- joe-4.0.orig/joe/uformat.c +++ joe-4.0/joe/uformat.c @@ -444,7 +444,7 @@ void wrapword(BW *bw, P *p, long int ind if (!pisbol(p) && piscol(p) > indent) { /* Move q to two (or one if 'french' is set) spaces after end of previous word */ - q = pdup(p, USTR "wrapword"); + q = pdup(p, USTR "wrapword;"); while (!pisbol(q)) if (!joe_isblank(p->b->o.charmap, (c = prgetc(q)))) { pgetc(q); @@ -578,10 +578,12 @@ int uformat(BW *bw) if (!bw->o.autoindent) { /* Don't indent second line of single-line paragraphs if autoindent is off */ int x = zlen(indents); + int start = x; while (x && (indents[x - 1] == ' ' || indents[x - 1] == '\t')) indents[--x] = 0; if (x) { - indents[x++] = ' '; + if(x < start) + indents[x++] = ' '; indents[x] = 0; } indent = txtwidth1(bw->o.charmap, bw->o.tab, indents, x);