jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=26570d64c08d4e7d1906d7f6b22bddf146e374ea

commit 26570d64c08d4e7d1906d7f6b22bddf146e374ea
Author: taehyub <taehyub....@samsung.com>
Date:   Fri Mar 4 16:17:48 2016 +0900

    template: Fix undo error by correcting cursor position
    
    Summary:
    There is a memorizing cursor in wrong position, it cause undo error.
    If insert the description template, undo operation is not working correctly.
    
    @fix
    
    Test Plan:
    1. press ctrl + t in the part, then insert description part
    2. press ctrl + z, undo the code
    3. see the normal operation
    
    Reviewers: Hermet, Jaehyun_Cho, NikaWhite
    
    Differential Revision: https://phab.enlightenment.org/D3760
---
 src/lib/template.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/template.c b/src/lib/template.c
index 5e519c7..4d81fd5 100644
--- a/src/lib/template.c
+++ b/src/lib/template.c
@@ -369,15 +369,15 @@ template_insert(edit_data *ed, 
Enventor_Template_Insert_Type insert_type,
 
    if (!t) goto end;
 
+   int cursor_pos = elm_entry_cursor_pos_get(entry);
+   int cursor_pos1 = elm_entry_cursor_pos_get(entry);
+
    if (strcmp(paragh, "images"))
      {
         elm_entry_entry_insert(entry, p);
         elm_entry_entry_insert(entry, first_line);
      }
 
-   int cursor_pos = elm_entry_cursor_pos_get(entry);
-   int cursor_pos1 = elm_entry_cursor_pos_get(entry);
-
    int i;
    for (i = 0; i < (line_cnt - 1); i++)
      {

-- 


Reply via email to