Edje entry: Fix to delete selection when preedit status has not ended.
authorSubodh Kumar <s7158.kumar@samsung.com>
Wed, 5 Aug 2015 10:02:53 +0000 (11:02 +0100)
committerTom Hacohen <tom@stosb.com>
Wed, 5 Aug 2015 10:02:53 +0000 (11:02 +0100)
Summary:
Fix to delete selection when preedit status has not ended

In preedit mode when selection is made and input any letter,
there is duplicate character appeared because the selection
is cleared when commit happens so delete the selection in
preedit last stage.

@fix

Test Plan: Test in Tizen devices.

Reviewers: woohyun, id213sin, shilpasingh, tasn

Subscribers: rajeshps, cedric, govi

Differential Revision: https://phab.enlightenment.org/D2837

src/lib/edje/edje_entry.c

index c095f16..bcdeea9 100644 (file)
@@ -4226,6 +4226,9 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
    if (!strcmp(preedit_string, ""))
      preedit_end_state = EINA_TRUE;
 
+   if (en->have_selection && !preedit_end_state)
+     _range_del_emit(ed, en->cursor, rp->object, en);
+
    /* delete preedit characters */
    _preedit_del(en);