summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorLM-LCL <hello@exaltedelite.club>2024-08-31 21:28:41 +0200
committerLM-LCL <hello@exaltedelite.club>2024-08-31 21:28:41 +0200
commit6eece88391d6dc3bfe54176249991cdc6cb8dd46 (patch)
tree078be96373ebc098b838e16f912679327a09cb13 /patches
parentab3144f7dd3ee40d99328b51f8bc1d2f8ddc548e (diff)
st-0.9.2
Diffstat (limited to 'patches')
-rw-r--r--patches/st-externalpipe-0.8.5.diff (renamed from patches/st-externalpipe-0.8.4.diff)20
-rw-r--r--patches/st-scrollback-0.9.2.diff (renamed from patches/st-scrollback-0.8.5.diff)55
2 files changed, 44 insertions, 31 deletions
diff --git a/patches/st-externalpipe-0.8.4.diff b/patches/st-externalpipe-0.8.5.diff
index 297d746..daf91d3 100644
--- a/patches/st-externalpipe-0.8.4.diff
+++ b/patches/st-externalpipe-0.8.5.diff
@@ -1,8 +1,8 @@
diff --git a/st.c b/st.c
-index 76b7e0d..0e9a614 100644
+index 034954d..98f2589 100644
--- a/st.c
+++ b/st.c
-@@ -723,8 +723,14 @@ sigchld(int a)
+@@ -718,8 +718,14 @@ sigchld(int a)
if ((p = waitpid(pid, &stat, WNOHANG)) < 0)
die("waiting for pid %hd failed: %s\n", pid, strerror(errno));
@@ -18,7 +18,16 @@ index 76b7e0d..0e9a614 100644
if (WIFEXITED(stat) && WEXITSTATUS(stat))
die("child exited with status %d\n", WEXITSTATUS(stat));
-@@ -1926,6 +1932,59 @@ strparse(void)
+@@ -803,7 +809,7 @@ ttynew(const char *line, char *cmd, const char *out, char **args)
+ break;
+ default:
+ #ifdef __OpenBSD__
+- if (pledge("stdio rpath tty proc", NULL) == -1)
++ if (pledge("stdio rpath tty proc exec", NULL) == -1)
+ die("pledge\n");
+ #endif
+ close(s);
+@@ -1991,6 +1997,59 @@ strparse(void)
}
}
@@ -79,7 +88,7 @@ index 76b7e0d..0e9a614 100644
strdump(void)
{
diff --git a/st.h b/st.h
-index 3d351b6..392b64e 100644
+index fd3b0d8..754cd08 100644
--- a/st.h
+++ b/st.h
@@ -81,6 +81,7 @@ void die(const char *, ...);
@@ -90,3 +99,6 @@ index 3d351b6..392b64e 100644
void printscreen(const Arg *);
void printsel(const Arg *);
void sendbreak(const Arg *);
+--
+2.42.0
+
diff --git a/patches/st-scrollback-0.8.5.diff b/patches/st-scrollback-0.9.2.diff
index 750111d..f9782e8 100644
--- a/patches/st-scrollback-0.8.5.diff
+++ b/patches/st-scrollback-0.9.2.diff
@@ -1,5 +1,5 @@
diff --git a/config.def.h b/config.def.h
-index 91ab8ca..e3b469b 100644
+index 2cd740a..40b7d93 100644
--- a/config.def.h
+++ b/config.def.h
@@ -201,6 +201,8 @@ static Shortcut shortcuts[] = {
@@ -7,12 +7,12 @@ index 91ab8ca..e3b469b 100644
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
+ { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
-+ { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
++ { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
};
/*
diff --git a/st.c b/st.c
-index 51049ba..cd750f2 100644
+index b9f66e7..2478942 100644
--- a/st.c
+++ b/st.c
@@ -35,6 +35,7 @@
@@ -28,8 +28,8 @@ index 51049ba..cd750f2 100644
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
#define ISDELIM(u) (u && wcschr(worddelimiters, u))
+#define TLINE(y) ((y) < term.scr ? term.hist[((y) + term.histi - \
-+ term.scr + HISTSIZE + 1) % HISTSIZE] : \
-+ term.line[(y) - term.scr])
++ term.scr + HISTSIZE + 1) % HISTSIZE] : \
++ term.line[(y) - term.scr])
enum term_mode {
MODE_WRAP = 1 << 0,
@@ -43,7 +43,7 @@ index 51049ba..cd750f2 100644
int *dirty; /* dirtyness of lines */
TCursor c; /* cursor */
int ocx; /* old cursor col */
-@@ -184,8 +191,8 @@ static void tnewline(int);
+@@ -185,8 +192,8 @@ static void tnewline(int);
static void tputtab(int);
static void tputc(Rune);
static void treset(void);
@@ -54,7 +54,7 @@ index 51049ba..cd750f2 100644
static void tsetattr(const int *, int);
static void tsetchar(Rune, const Glyph *, int, int);
static void tsetdirt(int, int);
-@@ -416,10 +423,10 @@ tlinelen(int y)
+@@ -409,10 +416,10 @@ tlinelen(int y)
{
int i = term.col;
@@ -67,7 +67,7 @@ index 51049ba..cd750f2 100644
--i;
return i;
-@@ -528,7 +535,7 @@ selsnap(int *x, int *y, int direction)
+@@ -521,7 +528,7 @@ selsnap(int *x, int *y, int direction)
* Snap around if the word wraps around at the end or
* beginning of a line.
*/
@@ -76,7 +76,7 @@ index 51049ba..cd750f2 100644
prevdelim = ISDELIM(prevgp->u);
for (;;) {
newx = *x + direction;
-@@ -543,14 +550,14 @@ selsnap(int *x, int *y, int direction)
+@@ -536,14 +543,14 @@ selsnap(int *x, int *y, int direction)
yt = *y, xt = *x;
else
yt = newy, xt = newx;
@@ -93,7 +93,7 @@ index 51049ba..cd750f2 100644
delim = ISDELIM(gp->u);
if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
|| (delim && gp->u != prevgp->u)))
-@@ -571,14 +578,14 @@ selsnap(int *x, int *y, int direction)
+@@ -564,14 +571,14 @@ selsnap(int *x, int *y, int direction)
*x = (direction < 0) ? 0 : term.col - 1;
if (direction < 0) {
for (; *y > 0; *y += direction) {
@@ -110,7 +110,7 @@ index 51049ba..cd750f2 100644
& ATTR_WRAP)) {
break;
}
-@@ -609,13 +616,13 @@ getsel(void)
+@@ -602,13 +609,13 @@ getsel(void)
}
if (sel.type == SEL_RECTANGULAR) {
@@ -127,7 +127,7 @@ index 51049ba..cd750f2 100644
while (last >= gp && last->u == ' ')
--last;
-@@ -851,6 +858,9 @@ void
+@@ -844,6 +851,9 @@ void
ttywrite(const char *s, size_t n, int may_echo)
{
const char *next;
@@ -137,7 +137,7 @@ index 51049ba..cd750f2 100644
if (may_echo && IS_SET(MODE_ECHO))
twrite(s, n, 1);
-@@ -1062,12 +1072,52 @@ tswapscreen(void)
+@@ -1055,13 +1065,53 @@ tswapscreen(void)
}
void
@@ -181,6 +181,7 @@ index 51049ba..cd750f2 100644
Line temp;
LIMIT(n, 0, term.bot-orig+1);
+
+ if (copyhist) {
+ term.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;
+ temp = term.hist[term.histi];
@@ -188,10 +189,10 @@ index 51049ba..cd750f2 100644
+ term.line[term.bot] = temp;
+ }
+
-
tsetdirt(orig, term.bot-n);
tclearregion(0, term.bot-n+1, term.col-1, term.bot);
-@@ -1078,17 +1128,28 @@ tscrolldown(int orig, int n)
+
+@@ -1071,17 +1121,28 @@ tscrolldown(int orig, int n)
term.line[i-n] = temp;
}
@@ -222,7 +223,7 @@ index 51049ba..cd750f2 100644
tclearregion(0, orig, term.col-1, orig+n-1);
tsetdirt(orig+n, term.bot);
-@@ -1098,7 +1159,8 @@ tscrollup(int orig, int n)
+@@ -1091,7 +1152,8 @@ tscrollup(int orig, int n)
term.line[i+n] = temp;
}
@@ -232,7 +233,7 @@ index 51049ba..cd750f2 100644
}
void
-@@ -1127,7 +1189,7 @@ tnewline(int first_col)
+@@ -1120,7 +1182,7 @@ tnewline(int first_col)
int y = term.c.y;
if (y == term.bot) {
@@ -241,7 +242,7 @@ index 51049ba..cd750f2 100644
} else {
y++;
}
-@@ -1292,14 +1354,14 @@ void
+@@ -1285,14 +1347,14 @@ void
tinsertblankline(int n)
{
if (BETWEEN(term.c.y, term.top, term.bot))
@@ -258,9 +259,9 @@ index 51049ba..cd750f2 100644
}
int32_t
-@@ -1736,11 +1798,11 @@ csihandle(void)
- break;
+@@ -1730,11 +1792,11 @@ csihandle(void)
case 'S': /* SU -- Scroll <n> line up */
+ if (csiescseq.priv) break;
DEFAULT(csiescseq.arg[0], 1);
- tscrollup(term.top, csiescseq.arg[0]);
+ tscrollup(term.top, csiescseq.arg[0], 0);
@@ -272,7 +273,7 @@ index 51049ba..cd750f2 100644
break;
case 'L': /* IL -- Insert <n> blank lines */
DEFAULT(csiescseq.arg[0], 1);
-@@ -2330,7 +2392,7 @@ eschandle(uchar ascii)
+@@ -2306,7 +2368,7 @@ eschandle(uchar ascii)
return 0;
case 'D': /* IND -- Linefeed */
if (term.c.y == term.bot) {
@@ -281,7 +282,7 @@ index 51049ba..cd750f2 100644
} else {
tmoveto(term.c.x, term.c.y+1);
}
-@@ -2343,7 +2405,7 @@ eschandle(uchar ascii)
+@@ -2319,7 +2381,7 @@ eschandle(uchar ascii)
break;
case 'M': /* RI -- Reverse index */
if (term.c.y == term.top) {
@@ -290,7 +291,7 @@ index 51049ba..cd750f2 100644
} else {
tmoveto(term.c.x, term.c.y-1);
}
-@@ -2557,7 +2619,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
+@@ -2542,7 +2604,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
void
tresize(int col, int row)
{
@@ -299,7 +300,7 @@ index 51049ba..cd750f2 100644
int minrow = MIN(row, term.row);
int mincol = MIN(col, term.col);
int *bp;
-@@ -2594,6 +2656,14 @@ tresize(int col, int row)
+@@ -2579,6 +2641,14 @@ tresize(int col, int row)
term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
@@ -314,7 +315,7 @@ index 51049ba..cd750f2 100644
/* resize each row to new width, zero-pad if needed */
for (i = 0; i < minrow; i++) {
term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));
-@@ -2652,7 +2722,7 @@ drawregion(int x1, int y1, int x2, int y2)
+@@ -2637,7 +2707,7 @@ drawregion(int x1, int y1, int x2, int y2)
continue;
term.dirty[y] = 0;
@@ -323,7 +324,7 @@ index 51049ba..cd750f2 100644
}
}
-@@ -2673,8 +2743,9 @@ draw(void)
+@@ -2658,8 +2728,9 @@ draw(void)
cx--;
drawregion(0, 0, term.col, term.row);
@@ -336,7 +337,7 @@ index 51049ba..cd750f2 100644
term.ocy = term.c.y;
xfinishdraw();
diff --git a/st.h b/st.h
-index 519b9bd..da36b34 100644
+index fd3b0d8..818a6f8 100644
--- a/st.h
+++ b/st.h
@@ -81,6 +81,8 @@ void die(const char *, ...);