commit 8ad55be75a15c63b7bbb0057593172ae56abf3e9
Author: Jochen Sprickerhof <[email protected]>
Date:   Sun Apr 5 12:49:49 2020 +0200

    [st][scrollback] Update for latest git

diff --git a/st.suckless.org/patches/scrollback/index.md 
b/st.suckless.org/patches/scrollback/index.md
index d8053f3b..5513edf0 100644
--- a/st.suckless.org/patches/scrollback/index.md
+++ b/st.suckless.org/patches/scrollback/index.md
@@ -11,7 +11,7 @@ Download
 * [st-scrollback-0.8.diff](st-scrollback-0.8.diff)
 * [st-scrollback-0.8.1.diff](st-scrollback-0.8.1.diff)
 * [st-scrollback-0.8.2.diff](st-scrollback-0.8.2.diff)
-* [st-scrollback-20190331-21367a0.diff](st-scrollback-20190331-21367a0.diff)
+* [st-scrollback-20200504-28ad288.diff](st-scrollback-20200504-28ad288.diff)
 
 Apply the following patch on top of the previous to allow scrolling
 using `Shift+MouseWheel`.
diff --git 
a/st.suckless.org/patches/scrollback/st-scrollback-20190331-21367a0.diff 
b/st.suckless.org/patches/scrollback/st-scrollback-20200504-28ad288.diff
similarity index 85%
rename from 
st.suckless.org/patches/scrollback/st-scrollback-20190331-21367a0.diff
rename to st.suckless.org/patches/scrollback/st-scrollback-20200504-28ad288.diff
index 3abdecef..55a02d3f 100644
--- a/st.suckless.org/patches/scrollback/st-scrollback-20190331-21367a0.diff
+++ b/st.suckless.org/patches/scrollback/st-scrollback-20200504-28ad288.diff
@@ -1,8 +1,8 @@
 diff --git a/config.def.h b/config.def.h
-index 482901e..5352f43 100644
+index 546edda..ec1b576 100644
 --- a/config.def.h
 +++ b/config.def.h
-@@ -178,6 +178,8 @@ static Shortcut shortcuts[] = {
+@@ -186,6 +186,8 @@ static Shortcut shortcuts[] = {
        { TERMMOD,              XK_Y,           selpaste,       {.i =  0} },
        { ShiftMask,            XK_Insert,      selpaste,       {.i =  0} },
        { TERMMOD,              XK_Num_Lock,    numlock,        {.i =  0} },
@@ -12,7 +12,7 @@ index 482901e..5352f43 100644
  
  /*
 diff --git a/st.c b/st.c
-index 8e6ccb5..2599333 100644
+index 3e48410..f8b6f67 100644
 --- a/st.c
 +++ b/st.c
 @@ -35,6 +35,7 @@
@@ -43,7 +43,7 @@ index 8e6ccb5..2599333 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 8e6ccb5..2599333 100644
  static void tsetattr(int *, int);
  static void tsetchar(Rune, Glyph *, int, int);
  static void tsetdirt(int, int);
-@@ -409,10 +416,10 @@ tlinelen(int y)
+@@ -414,10 +421,10 @@ tlinelen(int y)
  {
        int i = term.col;
  
@@ -67,7 +67,7 @@ index 8e6ccb5..2599333 100644
                --i;
  
        return i;
-@@ -521,7 +528,7 @@ selsnap(int *x, int *y, int direction)
+@@ -526,7 +533,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 8e6ccb5..2599333 100644
                prevdelim = ISDELIM(prevgp->u);
                for (;;) {
                        newx = *x + direction;
-@@ -536,14 +543,14 @@ selsnap(int *x, int *y, int direction)
+@@ -541,14 +548,14 @@ selsnap(int *x, int *y, int direction)
                                        yt = *y, xt = *x;
                                else
                                        yt = newy, xt = newx;
@@ -93,7 +93,7 @@ index 8e6ccb5..2599333 100644
                        delim = ISDELIM(gp->u);
                        if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
                                        || (delim && gp->u != prevgp->u)))
-@@ -564,14 +571,14 @@ selsnap(int *x, int *y, int direction)
+@@ -569,14 +576,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 8e6ccb5..2599333 100644
                                                & ATTR_WRAP)) {
                                        break;
                                }
-@@ -602,13 +609,13 @@ getsel(void)
+@@ -607,13 +614,13 @@ getsel(void)
                }
  
                if (sel.type == SEL_RECTANGULAR) {
@@ -127,7 +127,7 @@ index 8e6ccb5..2599333 100644
                while (last >= gp && last->u == ' ')
                        --last;
  
-@@ -831,6 +838,9 @@ void
+@@ -836,6 +843,9 @@ void
  ttywrite(const char *s, size_t n, int may_echo)
  {
        const char *next;
@@ -137,7 +137,7 @@ index 8e6ccb5..2599333 100644
  
        if (may_echo && IS_SET(MODE_ECHO))
                twrite(s, n, 1);
-@@ -1042,13 +1052,53 @@ tswapscreen(void)
+@@ -1047,13 +1057,53 @@ tswapscreen(void)
  }
  
  void
@@ -192,7 +192,13 @@ index 8e6ccb5..2599333 100644
        tsetdirt(orig, term.bot-n);
        tclearregion(0, term.bot-n+1, term.col-1, term.bot);
  
-@@ -1062,13 +1112,23 @@ tscrolldown(int orig, int n)
+@@ -1063,17 +1113,28 @@ tscrolldown(int orig, int n)
+               term.line[i-n] = temp;
+       }
+ 
+-      selscroll(orig, n);
++      if (term.scr == 0)
++              selscroll(orig, n);
  }
  
  void
@@ -217,7 +223,17 @@ index 8e6ccb5..2599333 100644
        tclearregion(0, orig, term.col-1, orig+n-1);
        tsetdirt(orig+n, term.bot);
  
-@@ -1117,7 +1177,7 @@ tnewline(int first_col)
+@@ -1083,7 +1144,8 @@ tscrollup(int orig, int n)
+               term.line[i+n] = temp;
+       }
+ 
+-      selscroll(orig, -n);
++      if (term.scr == 0)
++              selscroll(orig, -n);
+ }
+ 
+ void
+@@ -1122,7 +1184,7 @@ tnewline(int first_col)
        int y = term.c.y;
  
        if (y == term.bot) {
@@ -226,7 +242,7 @@ index 8e6ccb5..2599333 100644
        } else {
                y++;
        }
-@@ -1282,14 +1342,14 @@ void
+@@ -1287,14 +1349,14 @@ void
  tinsertblankline(int n)
  {
        if (BETWEEN(term.c.y, term.top, term.bot))
@@ -243,7 +259,7 @@ index 8e6ccb5..2599333 100644
  }
  
  int32_t
-@@ -1720,11 +1780,11 @@ csihandle(void)
+@@ -1725,11 +1787,11 @@ csihandle(void)
                break;
        case 'S': /* SU -- Scroll <n> line up */
                DEFAULT(csiescseq.arg[0], 1);
@@ -257,7 +273,7 @@ index 8e6ccb5..2599333 100644
                break;
        case 'L': /* IL -- Insert <n> blank lines */
                DEFAULT(csiescseq.arg[0], 1);
-@@ -2227,7 +2287,7 @@ eschandle(uchar ascii)
+@@ -2235,7 +2297,7 @@ eschandle(uchar ascii)
                return 0;
        case 'D': /* IND -- Linefeed */
                if (term.c.y == term.bot) {
@@ -266,7 +282,7 @@ index 8e6ccb5..2599333 100644
                } else {
                        tmoveto(term.c.x, term.c.y+1);
                }
-@@ -2240,7 +2300,7 @@ eschandle(uchar ascii)
+@@ -2248,7 +2310,7 @@ eschandle(uchar ascii)
                break;
        case 'M': /* RI -- Reverse index */
                if (term.c.y == term.top) {
@@ -275,7 +291,7 @@ index 8e6ccb5..2599333 100644
                } else {
                        tmoveto(term.c.x, term.c.y-1);
                }
-@@ -2458,7 +2518,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
+@@ -2469,7 +2531,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
  void
  tresize(int col, int row)
  {
@@ -284,7 +300,7 @@ index 8e6ccb5..2599333 100644
        int minrow = MIN(row, term.row);
        int mincol = MIN(col, term.col);
        int *bp;
-@@ -2495,6 +2555,14 @@ tresize(int col, int row)
+@@ -2506,6 +2568,14 @@ tresize(int col, int row)
        term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
        term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
  
@@ -299,7 +315,7 @@ index 8e6ccb5..2599333 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));
-@@ -2552,7 +2620,7 @@ drawregion(int x1, int y1, int x2, int y2)
+@@ -2563,7 +2633,7 @@ drawregion(int x1, int y1, int x2, int y2)
                        continue;
  
                term.dirty[y] = 0;
@@ -308,7 +324,7 @@ index 8e6ccb5..2599333 100644
        }
  }
  
-@@ -2573,8 +2641,9 @@ draw(void)
+@@ -2584,8 +2654,9 @@ draw(void)
                cx--;
  
        drawregion(0, 0, term.col, term.row);
@@ -321,10 +337,10 @@ index 8e6ccb5..2599333 100644
        xfinishdraw();
        xximspot(term.ocx, term.ocy);
 diff --git a/st.h b/st.h
-index 4da3051..f11685d 100644
+index a1928ca..1332cf1 100644
 --- a/st.h
 +++ b/st.h
-@@ -80,6 +80,8 @@ void die(const char *, ...);
+@@ -81,6 +81,8 @@ void die(const char *, ...);
  void redraw(void);
  void draw(void);
  


Reply via email to