moosotc_AT_gmail.com writes:
> Hello,
>
> I grew accustomed to button3 behavior in rxvt and wanted to add
> something similar to st, my attempt sort of works but is not ideal and
> not what rxvt does, here's the diff:
[..snip..]
>
>
> This is on top of st-scrollback-0.7.diff. Any help in matching rxvt's
> behavior is appreciated.
>
Following is a cleaned up version that is against git HEAD, not sure how
to formally propose it for inclusion though...
diff --git a/st.c b/st.c
index fbcd9e0..d650087 100644
--- a/st.c
+++ b/st.c
_AT_@ -999,6 +999,25 @@ bpress(XEvent *e)
tsetdirt(sel.nb.y, sel.ne.y);
sel.tclick2 = sel.tclick1;
sel.tclick1 = now;
+ } else if (e->xbutton.button == Button3) {
+ selclear(NULL);
+ sel.mode = SEL_EMPTY;
+ sel.type = SEL_REGULAR;
+
+ sel.oe.x = x2col(e->xbutton.x);
+ sel.oe.y = y2row(e->xbutton.y);
+ sel.ob.x = sel.nb.x;
+ sel.ob.y = sel.nb.y;
+
+ sel.snap = 0;
+ selnormalize();
+
+ sel.mode = SEL_READY;
+ tsetdirt(sel.nb.y, sel.ne.y);
+ sel.tclick2 = sel.tclick1 = now;
+ getbuttoninfo(e);
+ selcopy(e->xbutton.time);
+ sel.mode = SEL_IDLE;
}
}
--
mailto:moosotc_AT_gmail.com
Received on Mon Dec 26 2016 - 13:25:08 CET