[wiki] [sites] [st][scrollback] Clean altscreen || Ivan Tham
commit c36d2e96f2265bfd11d1e7ac6d5785334d875495
Author: Ivan Tham <pickfire_AT_riseup.net>
Date: Sat Feb 2 13:29:05 2019 +0800
[st][scrollback] Clean altscreen
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 e9d9d218..989e0059 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,39 +13,11 @@ 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..2dc315e 100644
+index e9fd6e9..31ecea8 100644
--- a/x.c
+++ b/x.c
-_AT_@ -417,11 +417,13 @@ bpress(XEvent *e)
+_AT_@ -417,13 +417,14 @@ bpress(XEvent *e)
return;
}
_AT_@ -54,7 +26,7 @@ index e9fd6e9..2dc315e 100644
- && match(ms->mask, e->xbutton.state)) {
- ttywrite(ms->s, strlen(ms->s), 1);
- return;
-+ if (tisaltscr()) {
++ if (IS_SET(MODE_ALTSCREEN))
+ for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
+ if (e->xbutton.button == ms->b
+ && match(ms->mask, e->xbutton.state)) {
_AT_@ -62,5 +34,7 @@ index e9fd6e9..2dc315e 100644
+ return;
+ }
}
- }
+- }
+ for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
+ if (e->xbutton.button == mk->b
Received on Sat Feb 02 2019 - 06:29:33 CET
This archive was generated by hypermail 2.3.0
: Sat Feb 02 2019 - 06:36:28 CET