diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2015-05-31 18:04:20 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2015-05-31 18:04:20 -0700 |
commit | 7e26b559fdb9fcf8c2ac23205db90154225f20b9 (patch) | |
tree | e9a87f76075a0cde326a8d47703b3cdd438668a5 | |
parent | 35bff0942d5fa7121dbc8609c45f3d39985b93c1 (diff) | |
parent | bb97200631d6ec0102ad45523ce63104eac139fd (diff) | |
download | efl-7e26b559fdb9fcf8c2ac23205db90154225f20b9.tar.gz |
Merge "Fix issue wrong surrounding text returns when there is selection area" into tizen
-rw-r--r-- | src/lib/edje/edje_entry.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 5b73afe213..d136a2d865 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -3964,7 +3964,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) || @@ -3984,20 +3983,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; @@ -4011,9 +3997,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; |