hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=8067dfe9165efca459ac9b7b224eb5c4c44ea286
commit 8067dfe9165efca459ac9b7b224eb5c4c44ea286 Author: Mykyta Biliavskyi <m.biliavs...@samsung.com> Date: Thu Aug 7 15:28:38 2014 +0900 redoundo: fix cursor position after undo action. Summary: cursor sets after inserted symbol(or string) and shifted left after delete. @fix Reviewers: Hermet Reviewed By: Hermet Projects: #enventor Differential Revision: https://phab.enlightenment.org/D1283 --- src/bin/redoundo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/redoundo.c b/src/bin/redoundo.c index fa0bfa0..045f87e 100644 --- a/src/bin/redoundo.c +++ b/src/bin/redoundo.c @@ -104,7 +104,6 @@ redoundo_undo(redoundo_data *rd, Eina_Bool *changed) if (!rd->last_diff) return 0; - elm_entry_cursor_pos_set(rd->entry, rd->last_diff->cursor_pos); rd->internal_change = EINA_TRUE; int lines; @@ -133,6 +132,7 @@ redoundo_undo(redoundo_data *rd, Eina_Bool *changed) evas_textblock_cursor_free(cursor); } lines = -parser_line_cnt_get(NULL, rd->last_diff->text); + elm_entry_cursor_pos_set(rd->entry, rd->last_diff->cursor_pos); } else { @@ -142,6 +142,8 @@ redoundo_undo(redoundo_data *rd, Eina_Bool *changed) rd->last_diff->text); lines = parser_line_cnt_get(NULL, rd->last_diff->text); + elm_entry_cursor_pos_set(rd->entry, + (rd->last_diff->cursor_pos + rd->last_diff->length)); } rd->internal_change = EINA_FALSE; --