diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2015-05-29 13:16:49 +0900 |
---|---|---|
committer | Gwanglim Lee <gl77.lee@samsung.com> | 2015-05-29 03:54:22 -0700 |
commit | bb97200631d6ec0102ad45523ce63104eac139fd (patch) | |
tree | 3416f93e936c0e197f48ab4ca50dc3ee1b511f0b | |
parent | f4ab26dc570e6f4b7e8fec965369fba5b67ff488 (diff) | |
download | efl-bb97200631d6ec0102ad45523ce63104eac139fd.tar.gz |
Fix issue wrong surrounding text returns when there is selection area
@fix
Change-Id: Iff89b396c1a69d2879b9f710eb41e58e9d377b87
-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; |