Made gtkut_editable_get_selection return NULL if selection is of length zero.
[claws.git] / src / gtkutils.c
index 061f4f8e669daf043b3eb8bbca4c2796ea6ce7ed..c3fe890dda7eaa066f05d57c54dd2f0908ca257f 100644 (file)
@@ -258,6 +258,9 @@ gchar *gtkut_editable_get_selection(GtkEditable *editable)
 
        if (!editable->has_selection) return NULL;
 
+       if (editable->selection_start_pos == editable->selection_end_pos)
+               return NULL;
+       
        if (editable->selection_start_pos < editable->selection_end_pos) {
                start_pos = editable->selection_start_pos;
                end_pos = editable->selection_end_pos;