[wiki] [sites] st: update scrollback patch for current git (c035487) || Jochen Sprickerhof

From: <git_AT_suckless.org>
Date: Fri, 22 May 2015 09:21:25 +0200

commit fcc8ca2372b828e8f1b06e56be33c02749481542
Author: Jochen Sprickerhof <git_AT_jochen.sprickerhof.de>
Date: Fri May 22 09:20:50 2015 +0200

    st: update scrollback patch for current git (c035487)

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

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 18:41:49 CEST