From: Jihoon Kim Date: Thu, 8 Jun 2017 08:02:35 +0000 (+0900) Subject: edje: pass whole text to IMF in case of selection X-Git-Tag: upstream/1.20.0~724 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4519a8f9232efa1abcde53883ab4ac01de356492;p=platform%2Fupstream%2Fefl.git edje: pass whole text to IMF in case of selection Summary: This patch partially reverts D2951. _edje_entry_imf_retrieve_surrounding_cb() function has to pass whole text nearby the entry's cursor. If IMF needs to ignore selected text when the entry has selection, IMF can check selected text by calling _edje_entry_imf_retrieve_selection_cb(). So, we don't need remove selected text before passing it to IMF. @fix Test Plan: N/A Reviewers: woohyun, jihoon, subodh6129 Reviewed By: subodh6129 Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4321 --- diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 14c400c..74d93c8 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -4528,23 +4528,8 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_ for (itr = plain_text; itr && *itr; ++itr) *itr = '*'; } - if (en->have_selection) - { - if (en->sel_start) - { - *text = strndup(plain_text, - evas_textblock_cursor_pos_get(en->sel_start)); - } - else - { - *text = strdup(plain_text); - } - } - else - { - *text = strdup(plain_text); - } + *text = strdup(plain_text); free(plain_text); plain_text = NULL; }