[wiki] [sites] Revert "[st][scrollback] Clean altscreen" || Ivan Tham

From: <git_AT_suckless.org>
Date: Sat, 02 Feb 2019 07:33:30 +0100

commit 8e65be88ab4d6163990359741b3f36120b4dd403
Author: Ivan Tham <pickfire_AT_riseup.net>
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
_AT_@ -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
+_AT_@ -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
+_AT_@ -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
-_AT_@ -417,13 +417,14 @@ bpress(XEvent *e)
+_AT_@ -417,11 +417,13 @@ bpress(XEvent *e)
                  return;
          }
  
_AT_@ -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)) {
_AT_@ -34,7 +62,5 @@ index e9fd6e9..31ecea8 100644
 + return;
 + }
                  }
-- }
+ }
  
- for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
- if (e->xbutton.button == mk->b
Received on Sat Feb 02 2019 - 07:33:30 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 02 2019 - 07:36:26 CET