aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje/edje_entry.c
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2017-09-29 15:29:31 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-29 15:29:32 +0900
commitd7a2993d4766ee2fe65705a243372a6987dd0d2c (patch)
tree742ada298e595b0eb08a5bbd0b4c0bfbeea6ed6d /src/lib/edje/edje_entry.c
parentevas font: check returned value of FcPatternGet function (diff)
downloadefl-d7a2993d4766ee2fe65705a243372a6987dd0d2c.tar.gz
edje entry: fill content info when text is deleted by imf event
Summary: There was missing info when text is deleted by _edje_entry_imf_event_delete_surrounding_cb(). @fix Test Plan: N/A Reviewers: kimcinoo, raster, cedric, jpeg, herdsman Differential Revision: https://phab.enlightenment.org/D5240
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_entry.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 36a713262d..5f7fb7437b 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -4921,6 +4921,7 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx E
Edje_Entry_Change_Info *info;
int cursor_pos;
int start, end;
+ char *tmp;
rp = _edje_entry_imf_default_focused_rp_get(ed);
if ((!rp)) return;
@@ -4945,9 +4946,6 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx E
end = evas_textblock_cursor_pos_get(del_end);
if (start == end) goto end;
- evas_textblock_cursor_range_delete(del_start, del_end);
- _anchors_get(en->cursor, rp->object, en);
- _anchors_update_check(ed, rp);
info = calloc(1, sizeof(*info));
if (!info)
{
@@ -4957,6 +4955,15 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx E
info->insert = EINA_FALSE;
info->change.del.start = start;
info->change.del.end = end;
+
+ tmp = evas_textblock_cursor_range_text_get(del_start, del_end, EVAS_TEXTBLOCK_TEXT_MARKUP);
+ info->change.del.content = eina_stringshare_add(tmp);
+ if (tmp) free(tmp);
+
+ evas_textblock_cursor_range_delete(del_start, del_end);
+ _anchors_get(en->cursor, rp->object, en);
+ _anchors_update_check(ed, rp);
+
_edje_emit(ed, "entry,changed", en->rp->part->name);
_edje_emit_full(ed, "entry,changed,user", en->rp->part->name, info,
_free_entry_change_info);