hermet pushed a commit to branch master.

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

commit 44935bd484042efcc0f48de000b1a565cfcd30aa
Author: taehyub <taehyub....@samsung.com>
Date:   Wed Feb 17 21:54:36 2016 +0900

    remove unnecessary selection recover logic
    
    Summary:
    selection region recovery is applied twice in entry recover.
    there are selection region recovery logic before 
elm_entry_selection_region_set,
    but we also recover using elm_entry_selection_region_set.
    it is unncessary code.
    
    @fix
    
    Reviewers: Hermet, Jaehyun_Cho, NikaWhite
    
    Differential Revision: https://phab.enlightenment.org/D3709
---
 src/lib/edc_editor.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 9a7c522..25bf4ac 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -156,19 +156,7 @@ entry_recover(edit_data *ed, int cursor_pos, int 
sel_cur_begin, int sel_cur_end)
    edje_object_part_text_cursor_pos_set(en_edje, "elm.text",
                             EDJE_CURSOR_SELECTION_END, sel_cur_end);
 
-   //not on selection mode
-   if (ed->select_pos == -1) return;
-
    //recover selection region
-   const char *selected = elm_entry_selection_get(ed->en_edit);
-   if (!selected) return;
-   char *select_utf8 = elm_entry_markup_to_utf8(selected);
-   ed->on_select_recover = EINA_TRUE;
-   //there is a delay for getting ed->select_pos
-   //so here, calculate selection position using selection region
-   elm_entry_select_region_set(ed->en_edit,
-                               cursor_pos - strlen(select_utf8),
-                               cursor_pos);
    ed->on_select_recover = EINA_FALSE;
 }
 

-- 


Reply via email to