billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=904b3cf62e1f6201fa70aa22d23be89143342976
commit 904b3cf62e1f6201fa70aa22d23be89143342976 Author: Boris Faure <[email protected]> Date: Sun Feb 10 23:56:30 2019 +0100 termptyext: use real selection to test And not just compare with the codepoint array that may not have \n and too many spaces --- src/bin/termptyext.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/bin/termptyext.c b/src/bin/termptyext.c index d3b04fb..fba13f3 100644 --- a/src/bin/termptyext.c +++ b/src/bin/termptyext.c @@ -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++; } } --
