termptyext: use real selection to test
And not just compare with the codepoint array that may not have \n and too many spaces
This commit is contained in:
parent
aa9e74d401
commit
904b3cf62e
|
@ -221,15 +221,20 @@ static void
|
|||
_handle_selection_is(Termpty *ty,
|
||||
const Eina_Unicode *buf)
|
||||
{
|
||||
Eina_Unicode *cp = ty->selection.codepoints;
|
||||
size_t len = 0;
|
||||
Termio *sd = termio_get_from_obj(ty->obj);
|
||||
const char *s = termio_internal_get_selection(sd, &len);
|
||||
|
||||
assert(ty->selection.is_active);
|
||||
assert(ty->selection.codepoints != NULL);
|
||||
assert(s != NULL);
|
||||
return;
|
||||
|
||||
while (*buf)
|
||||
{
|
||||
assert(*buf == *cp);
|
||||
cp++;
|
||||
int idx;
|
||||
Eina_Unicode u = eina_unicode_utf8_next_get(s, &idx);
|
||||
|
||||
assert(*buf == u);
|
||||
s += idx;
|
||||
buf++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue