agree st-externalpipe with st-scrollback-ringbuffer

This commit is contained in:
2025-10-09 08:07:42 +02:00
parent a6f61c8b65
commit 1a19738a57
2 changed files with 3 additions and 2 deletions

4
st.c
View File

@@ -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;

1
st.h
View File

@@ -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 *);