commit 8e65be88ab4d6163990359741b3f36120b4dd403
Author: Ivan Tham <[email protected]>
Date:   Sat Feb 2 14:32:55 2019 +0800

    Revert "[st][scrollback] Clean altscreen"
    
    This reverts commit c36d2e96f2265bfd11d1e7ac6d5785334d875495.

diff --git 
a/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20190131-e23acb9.diff
 
b/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20190131-e23acb9.diff
index 989e0059..e9d9d218 100644
--- 
a/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20190131-e23acb9.diff
+++ 
b/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20190131-e23acb9.diff
@@ -13,11 +13,39 @@ index a6d2fb9..16830c8 100644
  };
  
  /* Internal keyboard shortcuts. */
+diff --git a/st.c b/st.c
+index 218ae73..f543305 100644
+--- a/st.c
++++ b/st.c
+@@ -1058,6 +1058,11 @@ tnew(int col, int row)
+       treset();
+ }
+ 
++int tisaltscr(void)
++{
++      return IS_SET(MODE_ALTSCREEN);
++}
++
+ void
+ tswapscreen(void)
+ {
+diff --git a/st.h b/st.h
+index 3592957..23f4ca3 100644
+--- a/st.h
++++ b/st.h
+@@ -95,6 +95,7 @@ void sendbreak(const Arg *);
+ void toggleprinter(const Arg *);
+ 
+ int tattrset(int);
++int tisaltscr(void);
+ void tnew(int, int);
+ void tresize(int, int);
+ void tsetdirtattr(int);
 diff --git a/x.c b/x.c
-index e9fd6e9..31ecea8 100644
+index e9fd6e9..2dc315e 100644
 --- a/x.c
 +++ b/x.c
-@@ -417,13 +417,14 @@ bpress(XEvent *e)
+@@ -417,11 +417,13 @@ bpress(XEvent *e)
                return;
        }
  
@@ -26,7 +54,7 @@ index e9fd6e9..31ecea8 100644
 -                              && match(ms->mask, e->xbutton.state)) {
 -                      ttywrite(ms->s, strlen(ms->s), 1);
 -                      return;
-+      if (IS_SET(MODE_ALTSCREEN))
++      if (tisaltscr()) {
 +              for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
 +                      if (e->xbutton.button == ms->b
 +                                      && match(ms->mask, e->xbutton.state)) {
@@ -34,7 +62,5 @@ index e9fd6e9..31ecea8 100644
 +                              return;
 +                      }
                }
--      }
+       }
  
-       for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
-               if (e->xbutton.button == mk->b


Reply via email to