Fix loop on selection. - sam - An updated version of the sam text editor. | |
git clone git://vernunftzentrum.de/sam.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit e3db7a503de6e0b49d224225da597a1bee0b89f5 | |
parent c27bc210c40768c6ff027b7fe505cec34bcdbb13 | |
Author: Rob King <[email protected]> | |
Date: Wed, 7 Dec 2016 15:52:03 -0600 | |
Fix loop on selection. | |
Diffstat: | |
libXg/gwin.c | 6 ++++++ | |
1 file changed, 6 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/libXg/gwin.c b/libXg/gwin.c | |
@@ -525,6 +525,12 @@ SelCallback(Widget w, XtPointer cldata, Atom *sel, Atom *s… | |
XTextProperty p = {0}; | |
char *ls[2] = {(char *)val, NULL}; | |
+ if (*seltype == 0){ | |
+ if (gw->gwin.selection == NULL) | |
+ gw->gwin.selection = strdup(""); | |
+ return; | |
+ } | |
+ | |
if(gw->gwin.selection){ | |
XtFree(gw->gwin.selection); | |
gw->gwin.selection = NULL; |