aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-04-05 01:23:08 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-04-05 13:36:01 +0900
commit0f24619dfaba6acf49c0c68303d7f022a067a086 (patch)
tree12133df3fc19ea510a4808b65d6294533eb8cc99
parentoptions_theme.c: fix CID 1388097 (diff)
downloadterminology-0f24619dfaba6acf49c0c68303d7f022a067a086.tar.gz
selection handling - donmt use null string selections if they are
fix a corner case where string selection is null when selection is requested (empty selection). @fix
-rw-r--r--src/bin/termio.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index e8f819b..65f6907 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2236,11 +2236,14 @@ _lost_selection_reset_job(void *data)
EINA_SAFETY_ON_NULL_RETURN(sd);
sd->sel_reset_job = NULL;
- elm_cnp_selection_set(sd->win, sd->sel_type,
- ELM_SEL_FORMAT_TEXT,
- sd->sel_str, strlen(sd->sel_str));
- elm_cnp_selection_loss_callback_set(sd->win, sd->sel_type,
- _lost_selection, data);
+ if (sd->sel_str)
+ {
+ elm_cnp_selection_set(sd->win, sd->sel_type,
+ ELM_SEL_FORMAT_TEXT,
+ sd->sel_str, strlen(sd->sel_str));
+ elm_cnp_selection_loss_callback_set(sd->win, sd->sel_type,
+ _lost_selection, data);
+ }
}
static void
@@ -2249,6 +2252,7 @@ _lost_selection(void *data, Elm_Sel_Type selection)
Eina_List *l;
Evas_Object *obj;
double t = ecore_time_get();
+
EINA_LIST_FOREACH(terms, l, obj)
{
Termio *sd = evas_object_smart_data_get(obj);