[wiki] [sites] updated scrollback patch || Martin Kopta
commit 5c8217316b8f2fe18fb669a223a1fabaf707b435
Author: Martin Kopta <martin_AT_kopta.eu>
Date: Wed Sep 16 09:11:59 2015 +0200
updated scrollback patch
diff --git a/st.suckless.org/patches/st-scrollback.diff b/st.suckless.org/patches/st-scrollback.diff
index 02878ec..6178928 100644
--- a/st.suckless.org/patches/st-scrollback.diff
+++ b/st.suckless.org/patches/st-scrollback.diff
_AT_@ -1,16 +1,16 @@
diff --git a/config.def.h b/config.def.h
-index 930e468..14d94fe 100644
+index b6adc5e..c3636fc 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -7,6 +7,7 @@
*/
- static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";
+ static char font[] = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
static int borderpx = 2;
+static int histsize = 2000;
/*
* What program is execed by st depends of these precedence rules:
-_AT_@ -145,6 +146,8 @@ static Shortcut shortcuts[] = {
+_AT_@ -155,6 +156,8 @@ static Shortcut shortcuts[] = {
{ MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} },
{ MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} },
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
_AT_@ -20,10 +20,10 @@ index 930e468..14d94fe 100644
/*
diff --git a/st.c b/st.c
-index 1df4fde..91f95a8 100644
+index bd8b815..3aaeb86 100644
--- a/st.c
+++ b/st.c
-_AT_@ -84,6 +84,8 @@ char *argv0;
+_AT_@ -85,6 +85,8 @@ char *argv0;
#define TRUERED(x) (((x) & 0xff0000) >> 8)
#define TRUEGREEN(x) (((x) & 0xff00))
#define TRUEBLUE(x) (((x) & 0xff) << 8)
_AT_@ -32,7 +32,7 @@ index 1df4fde..91f95a8 100644
enum glyph_attribute {
-_AT_@ -232,6 +234,9 @@ typedef struct {
+_AT_@ -233,6 +235,9 @@ typedef struct {
int col; /* nb col */
Line *line; /* screen */
Line *alt; /* alternate screen */
_AT_@ -42,7 +42,7 @@ index 1df4fde..91f95a8 100644
int *dirty; /* dirtyness of lines */
XftGlyphFontSpec *specbuf; /* font spec buffer used for rendering */
TCursor c; /* cursor */
-_AT_@ -325,6 +330,8 @@ typedef struct {
+_AT_@ -326,6 +331,8 @@ typedef struct {
/* function definitions used in config.h */
static void clipcopy(const Arg *);
static void clippaste(const Arg *);
_AT_@ -51,7 +51,7 @@ index 1df4fde..91f95a8 100644
static void numlock(const Arg *);
static void selpaste(const Arg *);
static void xzoom(const Arg *);
-_AT_@ -396,8 +403,8 @@ static void tputtab(int);
+_AT_@ -398,8 +405,8 @@ static void tputtab(int);
static void tputc(Rune);
static void treset(void);
static void tresize(int, int);
_AT_@ -62,7 +62,7 @@ index 1df4fde..91f95a8 100644
static void tsetattr(int *, int);
static void tsetchar(Rune, Glyph *, int, int);
static void tsetscroll(int, int);
-_AT_@ -727,10 +734,10 @@ tlinelen(int y)
+_AT_@ -729,10 +736,10 @@ tlinelen(int y)
{
int i = term.col;
_AT_@ -75,7 +75,7 @@ index 1df4fde..91f95a8 100644
--i;
return i;
-_AT_@ -792,7 +799,7 @@ selsnap(int *x, int *y, int direction)
+_AT_@ -794,7 +801,7 @@ selsnap(int *x, int *y, int direction)
* Snap around if the word wraps around at the end or
* beginning of a line.
*/
_AT_@ -84,7 +84,7 @@ index 1df4fde..91f95a8 100644
prevdelim = ISDELIM(prevgp->u);
for (;;) {
newx = *x + direction;
-_AT_@ -807,14 +814,14 @@ selsnap(int *x, int *y, int direction)
+_AT_@ -809,14 +816,14 @@ selsnap(int *x, int *y, int direction)
yt = *y, xt = *x;
else
yt = newy, xt = newx;
_AT_@ -101,7 +101,7 @@ index 1df4fde..91f95a8 100644
delim = ISDELIM(gp->u);
if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
|| (delim && gp->u != prevgp->u)))
-_AT_@ -835,14 +842,14 @@ selsnap(int *x, int *y, int direction)
+_AT_@ -837,14 +844,14 @@ selsnap(int *x, int *y, int direction)
*x = (direction < 0) ? 0 : term.col - 1;
if (direction < 0) {
for (; *y > 0; *y += direction) {
_AT_@ -118,8 +118,8 @@ index 1df4fde..91f95a8 100644
& ATTR_WRAP)) {
break;
}
-_AT_@ -1005,13 +1012,13 @@ getsel(void)
- linelen = tlinelen(y);
+_AT_@ -1010,13 +1017,13 @@ getsel(void)
+ }
if (sel.type == SEL_RECTANGULAR) {
- gp = &term.line[y][sel.nb.x];
_AT_@ -135,7 +135,7 @@ index 1df4fde..91f95a8 100644
while (last >= gp && last->u == ' ')
--last;
-_AT_@ -1484,6 +1491,8 @@ ttyread(void)
+_AT_@ -1489,6 +1496,8 @@ ttyread(void)
/* keep any uncomplete utf8 char for the next call */
memmove(buf, ptr, buflen);
_AT_@ -144,7 +144,7 @@ index 1df4fde..91f95a8 100644
}
void
-_AT_@ -1492,6 +1501,9 @@ ttywrite(const char *s, size_t n)
+_AT_@ -1497,6 +1506,9 @@ ttywrite(const char *s, size_t n)
fd_set wfd;
struct timespec tv;
ssize_t r;
_AT_@ -154,7 +154,7 @@ index 1df4fde..91f95a8 100644
/*
* Remember that we are using a pty, which might be a modem line.
-_AT_@ -1682,13 +1694,53 @@ tswapscreen(void)
+_AT_@ -1688,13 +1700,53 @@ tswapscreen(void)
}
void
_AT_@ -209,7 +209,7 @@ index 1df4fde..91f95a8 100644
tsetdirt(orig, term.bot-n);
tclearregion(0, term.bot-n+1, term.col-1, term.bot);
-_AT_@ -1702,13 +1754,20 @@ tscrolldown(int orig, int n)
+_AT_@ -1708,13 +1760,20 @@ tscrolldown(int orig, int n)
}
void
_AT_@ -231,7 +231,7 @@ index 1df4fde..91f95a8 100644
tclearregion(0, orig, term.col-1, orig+n-1);
tsetdirt(orig+n, term.bot);
-_AT_@ -1757,7 +1816,7 @@ tnewline(int first_col)
+_AT_@ -1763,7 +1822,7 @@ tnewline(int first_col)
int y = term.c.y;
if (y == term.bot) {
_AT_@ -240,7 +240,7 @@ index 1df4fde..91f95a8 100644
} else {
y++;
}
-_AT_@ -1922,14 +1981,14 @@ void
+_AT_@ -1928,14 +1987,14 @@ void
tinsertblankline(int n)
{
if (BETWEEN(term.c.y, term.top, term.bot))
_AT_@ -257,7 +257,7 @@ index 1df4fde..91f95a8 100644
}
int32_t
-_AT_@ -2363,11 +2422,11 @@ csihandle(void)
+_AT_@ -2369,11 +2428,11 @@ csihandle(void)
break;
case 'S': /* SU -- Scroll <n> line up */
DEFAULT(csiescseq.arg[0], 1);
_AT_@ -271,7 +271,7 @@ index 1df4fde..91f95a8 100644
break;
case 'L': /* IL -- Insert <n> blank lines */
DEFAULT(csiescseq.arg[0], 1);
-_AT_@ -2837,7 +2896,7 @@ eschandle(uchar ascii)
+_AT_@ -2869,7 +2928,7 @@ eschandle(uchar ascii)
return 0;
case 'D': /* IND -- Linefeed */
if (term.c.y == term.bot) {
_AT_@ -280,7 +280,7 @@ index 1df4fde..91f95a8 100644
} else {
tmoveto(term.c.x, term.c.y+1);
}
-_AT_@ -2850,7 +2909,7 @@ eschandle(uchar ascii)
+_AT_@ -2882,7 +2941,7 @@ eschandle(uchar ascii)
break;
case 'M': /* RI -- Reverse index */
if (term.c.y == term.top) {
_AT_@ -289,7 +289,7 @@ index 1df4fde..91f95a8 100644
} else {
tmoveto(term.c.x, term.c.y-1);
}
-_AT_@ -3013,7 +3072,7 @@ tputc(Rune u)
+_AT_@ -3045,7 +3104,7 @@ tputc(Rune u)
void
tresize(int col, int row)
{
_AT_@ -298,7 +298,7 @@ index 1df4fde..91f95a8 100644
int minrow = MIN(row, term.row);
int mincol = MIN(col, term.col);
int *bp;
-_AT_@ -3050,9 +3109,18 @@ tresize(int col, int row)
+_AT_@ -3082,9 +3141,18 @@ tresize(int col, int row)
/* resize to new height */
term.line = xrealloc(term.line, row * sizeof(Line));
term.alt = xrealloc(term.alt, row * sizeof(Line));
_AT_@ -317,7 +317,7 @@ index 1df4fde..91f95a8 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));
-_AT_@ -3924,11 +3992,11 @@ drawregion(int x1, int y1, int x2, int y2)
+_AT_@ -3956,11 +4024,11 @@ drawregion(int x1, int y1, int x2, int y2)
term.dirty[y] = 0;
specs = term.specbuf;
_AT_@ -331,7 +331,7 @@ index 1df4fde..91f95a8 100644
if (new.mode == ATTR_WDUMMY)
continue;
if (ena_sel && selected(x, y))
-_AT_@ -3948,7 +4016,8 @@ drawregion(int x1, int y1, int x2, int y2)
+_AT_@ -3980,7 +4048,8 @@ drawregion(int x1, int y1, int x2, int y2)
if (i > 0)
xdrawglyphfontspecs(specs, base, i, ox, y);
}
Received on Wed Sep 16 2015 - 09:12:06 CEST
This archive was generated by hypermail 2.3.0
: Wed Sep 16 2015 - 09:24:10 CEST