summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2012-11-26 03:11:02 -0800
committerTingPing <tingping@tingping.se>2012-11-26 03:11:02 -0800
commit7424c0c68bf4f4152544a051453ef950b19c5c96 (patch)
tree25c62f728d1295a389fe6935d99f48000abb4b7d
parentacc90d4e7753ae6e8315d900b068b90ea8e53f1a (diff)
parent1bb0f3408432a497df8ba1fba26c03ae6985f2e0 (diff)
Merge pull request #292 from RichardHitt/master
Fix for issue #289, autocopy though no text selected
-rw-r--r--src/fe-gtk/xtext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c
index 87877b87..611bf090 100644
--- a/src/fe-gtk/xtext.c
+++ b/src/fe-gtk/xtext.c
@@ -2165,8 +2165,9 @@ gtk_xtext_set_clip_owner (GtkWidget * xtext, GdkEventButton * event)
 	str = gtk_xtext_selection_get_text (GTK_XTEXT (xtext), &len);
 	if (str)
 	{
-		gtk_clipboard_set_text (gtk_widget_get_clipboard (xtext, GDK_SELECTION_CLIPBOARD),
-										str, len);
+		if (str[0])
+			gtk_clipboard_set_text (gtk_widget_get_clipboard (xtext, GDK_SELECTION_CLIPBOARD),
+											str, len);
 		free (str);
 	}