2015-10-04 22:57:00 +02:00
|
|
|
---
|
|
|
|
joe/uformat.c | 6 ++++--
|
|
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
Index: joe-4.1/joe/uformat.c
|
2009-10-26 16:55:32 +01:00
|
|
|
===================================================================
|
2015-10-04 22:57:00 +02:00
|
|
|
--- joe-4.1.orig/joe/uformat.c
|
|
|
|
+++ joe-4.1/joe/uformat.c
|
|
|
|
@@ -459,7 +459,7 @@ void wrapword(BW *bw, P *p, off_t indent
|
2009-10-27 16:33:33 +01:00
|
|
|
if (!pisbol(p) && piscol(p) > indent) {
|
|
|
|
/* Move q to two (or one if 'french' is set) spaces after end of previous
|
|
|
|
word */
|
2015-10-04 22:57:00 +02:00
|
|
|
- q = pdup(p, "wrapword");
|
|
|
|
+ q = pdup(p, "wrapword;");
|
2009-10-27 16:33:33 +01:00
|
|
|
while (!pisbol(q))
|
|
|
|
if (!joe_isblank(p->b->o.charmap, (c = prgetc(q)))) {
|
|
|
|
pgetc(q);
|
2015-10-04 22:57:00 +02:00
|
|
|
@@ -596,10 +596,12 @@ int uformat(W *w, int k)
|
2009-10-26 16:55:32 +01:00
|
|
|
if (!bw->o.autoindent) {
|
|
|
|
/* Don't indent second line of single-line paragraphs if autoindent is off */
|
2015-10-04 22:57:00 +02:00
|
|
|
ptrdiff_t tx = zlen(indents);
|
|
|
|
+ ptrdiff_t start = tx;
|
|
|
|
while (tx && (indents[tx - 1] == ' ' || indents[tx - 1] == '\t'))
|
|
|
|
indents[--tx] = 0;
|
|
|
|
if (tx) {
|
|
|
|
- indents[tx++] = ' ';
|
|
|
|
+ if (tx < start)
|
|
|
|
+ indents[tx++] = ' ';
|
|
|
|
indents[tx] = 0;
|
2009-10-26 16:55:32 +01:00
|
|
|
}
|
2015-10-04 22:57:00 +02:00
|
|
|
indent = txtwidth1(bw->o.charmap, bw->o.tab, indents, tx);
|