termio: return NULL when selection is empty

This fixes issues with link detection in backscroll.
This commit is contained in:
Boris Faure 2013-05-19 00:00:44 +02:00
parent cec34b56e8
commit 18e97fa840
1 changed files with 5 additions and 0 deletions

View File

@ -4182,6 +4182,11 @@ termio_selection_get(Evas_Object *obj, int c1x, int c1y, int c2x, int c2y)
}
termpty_cellcomp_thaw(sd->pty);
if (eina_strbuf_length_get(sb) == 0)
{
eina_strbuf_free(sb);
return NULL;
}
s = eina_strbuf_string_steal(sb);
eina_strbuf_free(sb);
return s;