hermet pushed a commit to branch master.

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

commit 0384f50f01551c51a02cb908560f628eb748a9ff
Author: Hermet Park <[email protected]>
Date:   Thu Jul 7 12:03:53 2016 +0900

    multi-file: find the first group when edc item has a focus.
    
    This properly switchs a current focused item view on realtime.
    That means, when user switch files, it will display the first group
    view in a new selected file.
---
 src/lib/edc_editor.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 34c29da..efa5421 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -1012,8 +1012,6 @@ edit_edc_load(edit_data *ed, const char *file_path)
    ed->cur_line = 1;
    ed->line_max = line_num;
 
-   group_name = parser_first_group_name_get(ed->pd, ed->en_edit);
-
    ecore_animator_add(syntax_color_timer_cb, ed);
 
    ret = EINA_TRUE;
@@ -1034,11 +1032,6 @@ err:
    evas_object_smart_callback_call(ed->enventor, SIG_MAX_LINE_CHANGED,
                                    &cursor_line);
 
-   if (ed->view_sync_cb)
-     ed->view_sync_cb(ed->view_sync_cb_data, NULL, 0.0, NULL, group_name);
-
-   eina_stringshare_del(group_name);
-
    elm_entry_cursor_pos_set(ed->en_edit, 0);
 
    return ret;
@@ -1178,6 +1171,14 @@ edit_view_sync_cb_set(edit_data *ed,
 {
    ed->view_sync_cb = cb;
    ed->view_sync_cb_data = data;
+
+   Eina_Stringshare *group_name =
+      parser_first_group_name_get(ed->pd, ed->en_edit);
+
+   if (ed->view_sync_cb)
+     ed->view_sync_cb(ed->view_sync_cb_data, NULL, 0.0, NULL, group_name);
+
+   eina_stringshare_del(group_name);
 }
 
 Eina_Bool

-- 


Reply via email to