[hackers] [st] fix regression by selecting clipboard text || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Tue, 20 Mar 2018 21:29:45 +0100 (CET)

commit f4020b2cc4fe45c9e8bfe47fc73deccd867cf9de
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Tue Mar 20 21:25:30 2018 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Tue Mar 20 21:25:30 2018 +0100

    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_AT_gmail.com>, thanks!

diff --git a/x.c b/x.c
index 12bc86b..c343ba2 100644
--- a/x.c
+++ b/x.c
_AT_@ -618,6 +618,9 @@ selrequest(XEvent *e)
 void
 setsel(char *str, Time t)
 {
+ if (!str)
+ return;
+
         free(xsel.primary);
         xsel.primary = str;
 
Received on Tue Mar 20 2018 - 21:29:45 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 20 2018 - 21:36:31 CET