commit | 565fd89edfb1858d4cbf6b334f0b7443cefada1c | [log] [tgz] |
---|---|---|
author | rsc <devnull@localhost> | Tue Feb 14 19:41:11 2006 +0000 |
committer | rsc <devnull@localhost> | Tue Feb 14 19:41:11 2006 +0000 |
tree | 9ee301fca6163a3c25d5dfc2ee7cf954ed738a00 | |
parent | 1bb8ccf14e1c405e8bd038b80b286e233c4a1556 [diff] |
better fmt -j
diff --git a/src/cmd/fmt.c b/src/cmd/fmt.c index f2ebb7b..362dcf4 100644 --- a/src/cmd/fmt.c +++ b/src/cmd/fmt.c
@@ -144,8 +144,12 @@ } /* how long is this word? */ for(l=0; line[l]; l++) - if(line[l]==' ' || line[l]=='\t') + if(line[l]==' ' || line[l]=='\t'){ + if(join) + while(line[l]==' ' || line[l]=='\t') + l++; break; + } words = addword(words, nwordp, line, l, indent, bol); bol = 0; line += l;