jaehyun pushed a commit to branch master.

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

commit d796f89805a53c8d0ba519b4e9aa2229c8b018ed
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Fri Nov 25 16:02:17 2016 +0900

    edc_editor: Fix not to append candidate slider values after error code.
    
    When error code is saved, cursor moves to the error code.
    
    This cursor position change causes that candidate slider values are
    appended after error code because cursor position moved to error code.
    This patch restores cursor position to candidate keyword.
    
    As a result, candidate slider values are always appended after candidate
    keyword.
---
 src/lib/edc_editor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 585c64c..1d5ffa0 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -41,6 +41,7 @@ struct editor_s
    int error_line;
    int syntax_color_lock;
    int cursor_pos;
+   int ctxpopup_cursor_pos;
    Evas_Coord scroller_h;
 
    struct {
@@ -522,7 +523,9 @@ ctxpopup_candidate_changed_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
    char *ch = NULL;
    int cur_pos, end_pos;
    int i;
-   cur_pos = elm_entry_cursor_pos_get(ed->en_edit);
+
+   cur_pos = ed->ctxpopup_cursor_pos;
+   elm_entry_cursor_pos_set(ed->en_edit, cur_pos);
    elm_entry_cursor_line_end_set(ed->en_edit);
    end_pos = elm_entry_cursor_pos_get(ed->en_edit);
 
@@ -718,6 +721,8 @@ candidate_list_show(edit_data *ed, char *text, char *cur, 
char *selected)
 
    parser_attribute_value_set(attr, cur);
 
+   ed->ctxpopup_cursor_pos = elm_entry_cursor_pos_get(ed->en_edit);
+
    //Show up the list of the types
    Enventor_Ctxpopup_Type type;
    Evas_Object *ctxpopup =

-- 


Reply via email to