From 71d1f725b3be3dd99d979059b3b51764acdaf368 Mon Sep 17 00:00:00 2001 From: syrell Date: Tue, 27 Jun 2023 22:30:31 +0200 Subject: [PATCH] feat/clipboard (#6) Reviewed-on: https://git.syyrell.com/syrell/st/pulls/6 --- x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x.c b/x.c index 95f2e4c..f6c3b80 100644 --- a/x.c +++ b/x.c @@ -689,6 +689,8 @@ setsel(char *str, Time t) XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) selclear(); + + xclipcopy(); } void @@ -712,7 +714,9 @@ brelease(XEvent *e) if (mouseaction(e, 1)) return; - if (btn == Button1) + if (btn == Button3) + selpaste(NULL); + else if (btn == Button1) mousesel(e, 1); }