funny that you still forget the ChangeLog updates Vincent
On Tue, Jan 3, 2012 at 10:55 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > Edje entry: Fix undo/redo with imf. > > Many thanks to Jihoon Kim and SeoZ for reporting this issue. > > Author: tasn > Date: 2012-01-03 01:55:59 -0800 (Tue, 03 Jan 2012) > New Revision: 66784 > Trac: http://trac.enlightenment.org/e/changeset/66784 > > Modified: > trunk/edje/src/lib/edje_entry.c > > Modified: trunk/edje/src/lib/edje_entry.c > =================================================================== > --- trunk/edje/src/lib/edje_entry.c 2012-01-03 06:45:07 UTC (rev 66783) > +++ trunk/edje/src/lib/edje_entry.c 2012-01-03 09:55:59 UTC (rev 66784) > @@ -2917,6 +2917,7 @@ > Ecore_IMF_Event_Commit *ev = event; > Evas_Textblock_Cursor *tc; > Eina_Bool cursor_move = EINA_FALSE; > + int start_pos; > > if ((!rp) || (!ev) || (!ev->str)) return ECORE_CALLBACK_PASS_ON; > > @@ -2933,7 +2934,7 @@ > if (strcmp(ev->str, "")) > { > /* delete selected characters */ > - _range_del(en->cursor, rp->object, en); > + _range_del_emit(ed, en->cursor, rp->object, en); > _sel_clear(en->cursor, rp->object, en); > } > } > @@ -2946,6 +2947,9 @@ > else > evas_textblock_cursor_copy(en->cursor, tc); > > + start_pos = evas_textblock_cursor_pos_get(tc); > + > + > #ifdef HAVE_ECORE_IMF > /* delete preedit characters */ > _preedit_del(en); > @@ -2985,9 +2989,19 @@ > _edje_entry_imf_cursor_info_set(en); > _anchors_get(en->cursor, rp->object, en); > _edje_emit(rp->edje, "entry,changed", rp->part->name); > - _edje_emit(ed, "entry,changed,user", rp->part->name); > - _edje_emit(ed, "cursor,changed", rp->part->name); > > + { > + Edje_Entry_Change_Info *info = calloc(1, sizeof(*info)); > + info->insert = EINA_TRUE; > + info->change.insert.pos = start_pos; > + info->change.insert.content = eina_stringshare_add(ev->str); > + info->change.insert.plain_length = > + eina_unicode_utf8_get_len(info->change.insert.content); > + _edje_emit_full(ed, "entry,changed,user", rp->part->name, > + info, _free_entry_change_info); > + _edje_emit(ed, "cursor,changed", rp->part->name); > + } > + > return ECORE_CALLBACK_DONE; > } > > @@ -3029,7 +3043,7 @@ > if (en->have_selection && !preedit_end_state) > { > /* delete selected characters */ > - _range_del(en->cursor, rp->object, en); > + _range_del_emit(ed, en->cursor, rp->object, en); > _sel_clear(en->cursor, rp->object, en); > } > > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel