aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2018-03-20 21:25:30 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-03-20 21:25:30 +0100
commitf4020b2cc4fe45c9e8bfe47fc73deccd867cf9de (patch)
tree51753c624e8cfa76216cd8a41e64495dea43d622 /x.c
parenta5a928bfc1dd049780a45e072cb4ee42de7219bf (diff)
downloadst-f4020b2cc4fe45c9e8bfe47fc73deccd867cf9de.tar.gz
st-f4020b2cc4fe45c9e8bfe47fc73deccd867cf9de.tar.bz2
st-f4020b2cc4fe45c9e8bfe47fc73deccd867cf9de.zip
fix regression by selecting clipboard text
"restore the old behaviour that the primary doesn't get deleted by a simple left click" Patch by Daniel Tameling <tamelingdaniel@gmail.com>, thanks!
Diffstat (limited to 'x.c')
-rw-r--r--x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/x.c b/x.c
index 12bc86b..c343ba2 100644
--- a/x.c
+++ b/x.c
@@ -618,6 +618,9 @@ selrequest(XEvent *e)
void
setsel(char *str, Time t)
{
+ if (!str)
+ return;
+
free(xsel.primary);
xsel.primary = str;