---
fold.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fold.c b/fold.c
index 169064b..10a23cf 100644
--- a/fold.c
+++ b/fold.c
@@ -29,12 +29,14 @@ foldline(struct line *l) {
eprintf("fwrite <stdout>:");
if (l->data[i] != '\n')
putchar('\n');
- last = (sflag && spacesect) ? spacesect : i;
+ if (sflag && spacesect)
+ i = spacesect;
+ last = i;
col = 0;
spacesect = 0;
}
runelen = chartorune(&r, l->data + i);
- if (sflag && isspace(l->data[i]))
+ if (sflag && isblankrune(r))
spacesect = i + 1;
if (!bflag && iscntrl(l->data[i])) {
switch(l->data[i]) {
--
2.26.2- [hackers] [sbase][PATCH 3/5] fold: don't putchar('\n') if l... Richard Ipsum
- [hackers] [sbase][PATCH 2/5] fold: fix handling of \b Richard Ipsum
- Re: [hackers] [sbase][PATCH 2/5] fold: fix handling of... Michael Forney
- [hackers] [sbase][PATCH 1/5] fold: fix tabstop column count Richard Ipsum
- [hackers] [sbase][PATCH 4/5] fold: fix handling of multibyt... Richard Ipsum
- Re: [hackers] [sbase][PATCH 4/5] fold: fix handling of... Michael Forney
- Re: [hackers] [sbase][PATCH 4/5] fold: fix handlin... Laslo Hunhold
- Re: [hackers] [sbase][PATCH 4/5] fold: fix han... Richard Ipsum
- Re: [hackers] [sbase][PATCH 4/5] fold: fix... Michael Forney
- Re: [hackers] [sbase][PATCH 4/5] fold: fix... Laslo Hunhold
- [hackers] [sbase][PATCH 5/5] fold: fix handling of -s Richard Ipsum
- Re: [hackers] [sbase][PATCH 5/5] fold: fix handling of... Michael Forney
- [hackers] Re: [sbase][PATCH 0/5] fold fixes Richard Ipsum
- Re: [hackers] Re: [sbase][PATCH 0/5] fold fixes Michael Forney
