jihoon pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=196e9092758150361556cfd2cf29013fc178ca3b
commit 196e9092758150361556cfd2cf29013fc178ca3b Author: Jihoon Kim <[email protected]> Date: Fri May 29 13:16:49 2015 +0900 Fix issue wrong surrounding text returns when there is selection area @fix Change-Id: Iff89b396c1a69d2879b9f710eb41e58e9d377b87 --- src/lib/edje/edje_entry.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 1f4fadb..c088610 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -4014,7 +4014,6 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_ Entry *en = NULL; const char *str; char *plain_text; - Eina_Strbuf *buf = NULL; if (!rp) return EINA_FALSE; if ((rp->type != EDJE_RP_TYPE_TEXT) || @@ -4034,20 +4033,7 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_ if (plain_text) { - if (en->have_selection) - { - buf = eina_strbuf_new(); - - if (en->sel_start) - eina_strbuf_append_n(buf, plain_text, evas_textblock_cursor_pos_get(en->sel_start)); - else - eina_strbuf_append(buf, plain_text); - - *text = strdup(eina_strbuf_string_get(buf)); - eina_strbuf_free(buf); - } - else - *text = strdup(plain_text); + *text = strdup(plain_text); free(plain_text); plain_text = NULL; @@ -4061,9 +4047,7 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_ if (cursor_pos) { - if (en->have_selection && en->sel_start) - *cursor_pos = evas_textblock_cursor_pos_get(en->sel_start); - else if (en->cursor) + if (en->cursor) *cursor_pos = evas_textblock_cursor_pos_get(en->cursor); else *cursor_pos = 0; --
