From 1a19738a57c3a222091917faebf9df6fead9add2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Thu, 9 Oct 2025 08:07:42 +0200 Subject: [PATCH] agree st-externalpipe with st-scrollback-ringbuffer --- st.c | 4 ++-- st.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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 *);