sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 8e65be88ab4d6163990359741b3f36120b4dd403
parent e4246f32c3c8c47f0d48acce2fe4dc14cf27e64c
Author: Ivan Tham <pickfire@riseup.net>
Date:   Sat,  2 Feb 2019 14:32:55 +0800

Revert "[st][scrollback] Clean altscreen"

This reverts commit c36d2e96f2265bfd11d1e7ac6d5785334d875495.

Diffstat:
Mst.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20190131-e23acb9.diff | 38++++++++++++++++++++++++++++++++------
1 file changed, 32 insertions(+), 6 deletions(-)

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 @@ -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