search: Fix to clear selection when find window is moved or closed.
Summary: Fix to clear selection when find window is moved or closed. Otherwise, the selection block begins from old one. Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D1581
This commit is contained in:
parent
ed3a2b93e5
commit
7f6206269e
|
@ -430,6 +430,7 @@ search_close(void)
|
|||
search_data *sd = g_sd;
|
||||
if (!sd) return;
|
||||
|
||||
enventor_object_select_none(sd->enventor);
|
||||
while (sd->syntax_color > 0)
|
||||
{
|
||||
enventor_object_syntax_color_partial_apply(sd->enventor, -1);
|
||||
|
|
|
@ -530,14 +530,20 @@ cur_line_pos_set(edit_data *ed, Eina_Bool force)
|
|||
(void *)line);
|
||||
}
|
||||
|
||||
void
|
||||
edit_selection_clear(edit_data *ed)
|
||||
{
|
||||
if (ed->on_select_recover) return;
|
||||
cur_line_pos_set(ed, EINA_TRUE);
|
||||
ed->select_pos = -1;
|
||||
}
|
||||
|
||||
static void
|
||||
edit_selection_cleared_cb(void *data, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
edit_data *ed = data;
|
||||
if (ed->on_select_recover) return;
|
||||
cur_line_pos_set(ed, EINA_TRUE);
|
||||
ed->select_pos = -1;
|
||||
edit_selection_clear(ed);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -223,5 +223,6 @@ Eina_Bool edit_part_highlight_get(edit_data *ed);
|
|||
void edit_ctxpopup_set(edit_data *ed, Eina_Bool ctxpopup);
|
||||
Eina_Bool edit_ctxpopup_get(edit_data *ed);
|
||||
Eina_Bool edit_load(edit_data *ed, const char *edc_path);
|
||||
void edit_selection_clear(edit_data *ed);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -416,6 +416,7 @@ EOLIAN static void
|
|||
_enventor_object_select_region_set(Eo *obj EINA_UNUSED,
|
||||
Enventor_Object_Data *pd, int start, int end)
|
||||
{
|
||||
edit_selection_clear(pd->ed);
|
||||
elm_entry_select_region_set(edit_entry_get(pd->ed), start, end);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue