diff --git a/st.c b/st.c index 8b3e16b..648acf7 100644 --- a/st.c +++ b/st.c @@ -2148,7 +2148,7 @@ externalpipe(const Arg *arg) oldsigpipe = signal(SIGPIPE, SIG_IGN); newline = 0; for (n = 0; n < term.row; n++) { - bp = term.line[n]; + bp = TLINE(n); lastpos = MIN(tlinelen(n) + 1, term.col) - 1; if (lastpos < 0) break; @@ -2156,7 +2156,7 @@ externalpipe(const Arg *arg) for (; bp < end; ++bp) if (xwrite(to[1], buf, utf8encode(bp->u, buf)) < 0) break; - if ((newline = term.line[n][lastpos].mode & ATTR_WRAP)) + if ((newline = TLINE(n)[lastpos].mode & ATTR_WRAP)) continue; if (xwrite(to[1], "\n", 1) < 0) break; diff --git a/st.h b/st.h index 3cea73b..0fc690c 100644 --- a/st.h +++ b/st.h @@ -82,6 +82,7 @@ void die(const char *, ...); void redraw(void); void draw(void); +void externalpipe(const Arg *); void printscreen(const Arg *); void printsel(const Arg *); void sendbreak(const Arg *);