hermet pushed a commit to branch master.

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

commit 94be5e37531784691a89e8511d06590b6a8e0600
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Fri Mar 7 00:35:34 2014 +0900

    search - find a next word as soon as it replaced one word.
---
 src/bin/edc_editor.c | 5 +++--
 src/bin/search.c     | 9 ++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/bin/edc_editor.c b/src/bin/edc_editor.c
index b983b39..5248153 100644
--- a/src/bin/edc_editor.c
+++ b/src/bin/edc_editor.c
@@ -99,8 +99,8 @@ static void
 syntax_color_timer_update(edit_data *ed)
 {
    if (ed->syntax_color_timer) ecore_timer_del(ed->syntax_color_timer);
-     ed->syntax_color_timer = ecore_timer_add(SYNTAX_COLOR_TIME,
-                                              syntax_color_timer_cb, ed);
+   ed->syntax_color_timer = ecore_timer_add(SYNTAX_COLOR_TIME,
+                                            syntax_color_timer_cb, ed);
 }
 
 static void
@@ -144,6 +144,7 @@ edit_changed_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info)
      }
 
    if (!syntax_color) return;
+   if (elm_entry_selection_get(ed->en_edit)) return;
    syntax_color_timer_update(ed);
 }
 
diff --git a/src/bin/search.c b/src/bin/search.c
index e9e562a..a2abe5b 100644
--- a/src/bin/search.c
+++ b/src/bin/search.c
@@ -165,8 +165,9 @@ replace_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
                    void *event_info EINA_UNUSED)
 {
    search_data *sd = data;
-   replace_proc(sd);
-   //if (replace_proc(sd)) find_forward_proc(sd);
+   Eina_Bool next;
+   next = replace_proc(sd);
+   if (next) find_forward_proc(sd);
 }
 
 static void
@@ -202,7 +203,9 @@ replace_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSE
    Evas_Event_Key_Down *ev = event_info;
    if (strcmp(ev->key, "Return")) return;
    search_data *sd = data;
-   replace_proc(sd);
+   Eina_Bool next;
+   next = replace_proc(sd);
+   if (next) find_forward_proc(sd);
 }
 
 void

-- 


Reply via email to