---
fold.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fold.c b/fold.c
index 9c3c919..dfce7c8 100644
--- a/fold.c
+++ b/fold.c
@@ -19,7 +19,7 @@ foldline(struct line *l) {
for (i = 0, last = 0, col = 0, spacesect = 0; i < l->len; i++) {
if (!UTF8_POINT(l->data[i]) && !bflag)
continue;
- if (col >= width) {
+ if (col >= width && ((l->data[i] != '\r' && l->data[i] != '\b')
|| bflag)) {
len = ((sflag && spacesect) ? spacesect : i) - last;
if (fwrite(l->data + last, 1, len, stdout) != len)
eprintf("fwrite <stdout>:");
--
2.28.0- [hackers] [sbase][PATCH v2 0/5] fold fixes Richard Ipsum
- [hackers] [sbase][PATCH 1/5] fold: fix tabstop column ... Richard Ipsum
- [hackers] [sbase][PATCH 5/5] fold: fix handling of -s Richard Ipsum
- [hackers] [sbase][PATCH 3/5] fold: don't putchar('\n')... Richard Ipsum
- [hackers] [sbase][PATCH 4/5] fold: fix handling of mul... Richard Ipsum
- [hackers] [sbase][PATCH 2/5] fold: fix handling of \b,... Richard Ipsum
- Re: [hackers] [sbase][PATCH v2 0/5] fold fixes Michael Forney
