forked from enlightenment/enventor
multi-file: make multi files work for auto completion.
This commit is contained in:
parent
fb7224f4a9
commit
4353d98bac
|
@ -153,6 +153,14 @@ context_lexem_thread_cb(void *data, Ecore_Thread *thread EINA_UNUSED)
|
|||
Eina_Bool find_flag = EINA_FALSE;
|
||||
Eina_Bool dot_lex = EINA_FALSE;
|
||||
|
||||
//In case of sub items, it won't contain "collections".
|
||||
//We added it arbitrary.
|
||||
if (!edit_is_main_file(td->ad->ed))
|
||||
{
|
||||
strcpy(stack[depth], "collections");
|
||||
depth++;
|
||||
}
|
||||
|
||||
while (cur && cur <= end)
|
||||
{
|
||||
//Check inside quote
|
||||
|
|
|
@ -1829,3 +1829,9 @@ edit_text_get(edit_data *ed)
|
|||
{
|
||||
return elm_entry_entry_get(ed->en_edit);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
edit_is_main_file(edit_data *ed)
|
||||
{
|
||||
return ed->main;
|
||||
}
|
||||
|
|
|
@ -282,6 +282,7 @@ void edit_select_none(edit_data *ed);
|
|||
void edit_cursor_pos_set(edit_data *ed, int position);
|
||||
int edit_cursor_pos_get(edit_data *ed);
|
||||
const char *edit_selection_get(edit_data *ed);
|
||||
Eina_Bool edit_is_main_file(edit_data *ed);
|
||||
|
||||
/* util */
|
||||
void mem_fail_msg(void);
|
||||
|
|
|
@ -356,7 +356,6 @@ _enventor_object_efl_file_file_set(Eo *obj EINA_UNUSED,
|
|||
const char *group EINA_UNUSED)
|
||||
{
|
||||
build_edc_path_set(file);
|
||||
autocomp_target_set(pd->main_it.ed);
|
||||
if (!file) goto err;
|
||||
|
||||
/* Create empty file*/
|
||||
|
@ -869,7 +868,6 @@ enventor_object_sub_item_add(Enventor_Object *obj, const char *file)
|
|||
it->ed = edit_init(obj, EINA_FALSE);
|
||||
it->pd = pd;
|
||||
|
||||
autocomp_target_set(it->ed);
|
||||
edit_load(it->ed, file);
|
||||
edit_changed_set(it->ed, EINA_FALSE);
|
||||
|
||||
|
@ -938,6 +936,8 @@ enventor_item_focus_set(Enventor_Item *it)
|
|||
edit_font_scale_set(it->ed, pd->font_scale);
|
||||
edit_disabled_set(it->ed, pd->disabled);
|
||||
|
||||
autocomp_target_set(it->ed);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue