From 4519a8f9232efa1abcde53883ab4ac01de356492 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 8 Jun 2017 17:02:35 +0900 Subject: [PATCH] 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 --- src/lib/edje/edje_entry.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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; } -- 2.7.4