diff --git a/patch/externalpipe.c b/patch/externalpipe.c index 37d8848..aea3be2 100644 --- a/patch/externalpipe.c +++ b/patch/externalpipe.c @@ -42,7 +42,11 @@ externalpipe(const Arg *arg) newline = 0; for (n = 0; n < term.row; n++) { bp = term.line[n]; + #if REFLOW_PATCH + lastpos = MIN(tlinelen(TLINE(n)), term.col) - 1; + #else lastpos = MIN(tlinelen(n) + 1, term.col) - 1; + #endif // REFLOW_PATCH if (lastpos < 0) break; end = &bp[lastpos + 1];