sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit fcc8ca2372b828e8f1b06e56be33c02749481542
parent 2ee778f8f301010cfec14f47c0e56fe66605108d
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date:   Fri, 22 May 2015 09:20:50 +0200

st: update scrollback patch for current git (c035487)

Diffstat:
Mst.suckless.org/patches/st-scrollback.diff | 30+++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/st.suckless.org/patches/st-scrollback.diff b/st.suckless.org/patches/st-scrollback.diff @@ -20,7 +20,7 @@ index bb5596e..2df4cbc 100644 /* diff --git a/st.c b/st.c -index c2da66b..f561654 100644 +index 0c6b9c3..ab56435 100644 --- a/st.c +++ b/st.c @@ -83,6 +83,8 @@ char *argv0; @@ -135,7 +135,7 @@ index c2da66b..f561654 100644 while(last >= gp && last->u == ' ') --last; -@@ -1361,10 +1368,16 @@ ttyread(void) { +@@ -1362,10 +1369,16 @@ ttyread(void) { /* keep any uncomplete utf8 char for the next call */ memmove(buf, ptr, buflen); @@ -152,7 +152,7 @@ index c2da66b..f561654 100644 if(xwrite(cmdfd, s, n) == -1) die("write error on tty: %s\n", strerror(errno)); } -@@ -1499,13 +1512,52 @@ tswapscreen(void) { +@@ -1500,13 +1513,52 @@ tswapscreen(void) { } void @@ -206,7 +206,7 @@ index c2da66b..f561654 100644 tclearregion(0, term.bot-n+1, term.col-1, term.bot); for(i = term.bot; i >= orig+n; i--) { -@@ -1518,12 +1570,19 @@ tscrolldown(int orig, int n) { +@@ -1519,12 +1571,19 @@ tscrolldown(int orig, int n) { } void @@ -227,7 +227,7 @@ index c2da66b..f561654 100644 tclearregion(0, orig, term.col-1, orig+n-1); tsetdirt(orig+n, term.bot); -@@ -1570,7 +1629,7 @@ tnewline(int first_col) { +@@ -1571,7 +1630,7 @@ tnewline(int first_col) { int y = term.c.y; if(y == term.bot) { @@ -236,7 +236,7 @@ index c2da66b..f561654 100644 } else { y++; } -@@ -1727,13 +1786,13 @@ tinsertblank(int n) { +@@ -1728,13 +1787,13 @@ tinsertblank(int n) { void tinsertblankline(int n) { if(BETWEEN(term.c.y, term.top, term.bot)) @@ -252,7 +252,7 @@ index c2da66b..f561654 100644 } int32_t -@@ -2162,11 +2221,11 @@ csihandle(void) { +@@ -2163,11 +2222,11 @@ csihandle(void) { break; case 'S': /* SU -- Scroll <n> line up */ DEFAULT(csiescseq.arg[0], 1); @@ -266,7 +266,7 @@ index c2da66b..f561654 100644 break; case 'L': /* IL -- Insert <n> blank lines */ DEFAULT(csiescseq.arg[0], 1); -@@ -2616,7 +2675,7 @@ eschandle(uchar ascii) { +@@ -2617,7 +2676,7 @@ eschandle(uchar ascii) { return 0; case 'D': /* IND -- Linefeed */ if(term.c.y == term.bot) { @@ -275,7 +275,7 @@ index c2da66b..f561654 100644 } else { tmoveto(term.c.x, term.c.y+1); } -@@ -2629,7 +2688,7 @@ eschandle(uchar ascii) { +@@ -2630,7 +2689,7 @@ eschandle(uchar ascii) { break; case 'M': /* RI -- Reverse index */ if(term.c.y == term.top) { @@ -284,7 +284,7 @@ index c2da66b..f561654 100644 } else { tmoveto(term.c.x, term.c.y-1); } -@@ -2790,7 +2849,7 @@ tputc(Rune u) { +@@ -2791,7 +2850,7 @@ tputc(Rune u) { void tresize(int col, int row) { @@ -293,7 +293,7 @@ index c2da66b..f561654 100644 int minrow = MIN(row, term.row); int mincol = MIN(col, term.col); bool *bp; -@@ -2827,9 +2886,18 @@ tresize(int col, int row) { +@@ -2828,9 +2887,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)); @@ -312,12 +312,12 @@ index c2da66b..f561654 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)); -@@ -3663,11 +3731,11 @@ drawregion(int x1, int y1, int x2, int y2) { +@@ -3664,11 +3732,11 @@ drawregion(int x1, int y1, int x2, int y2) { term.dirty[y] = 0; specs = term.specbuf; -- numspecs = xmakeglyphfontspecs(specs, &term.line[y][0], x2 - x1, x1, y); -+ numspecs = xmakeglyphfontspecs(specs, &TLINE(y)[0], x2 - x1, x1, y); +- numspecs = xmakeglyphfontspecs(specs, &term.line[y][x1], x2 - x1, x1, y); ++ numspecs = xmakeglyphfontspecs(specs, &TLINE(y)[x1], x2 - x1, x1, y); i = ox = 0; for(x = x1; x < x2 && i < numspecs; x++) { @@ -326,7 +326,7 @@ index c2da66b..f561654 100644 if(new.mode == ATTR_WDUMMY) continue; if(ena_sel && selected(x, y)) -@@ -3687,7 +3755,8 @@ drawregion(int x1, int y1, int x2, int y2) { +@@ -3688,7 +3756,8 @@ drawregion(int x1, int y1, int x2, int y2) { if(i > 0) xdrawglyphfontspecs(specs, base, i, ox, y); }