hermet pushed a commit to branch master.

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

commit e5ffff687244aa0008a64d8b664fcd6d19c905c1
Author: Hermet Park <[email protected]>
Date:   Thu Jun 2 00:41:08 2016 +0900

    ctxpopup: don't display image preview if image string is in comments.
    
    if image string is in comments, image shouldn't be appeared.
    but edc parser didn't compares texts elaborately and it came out error.
    
    now fixed it.
    
    @fix T3740
---
 src/lib/edc_editor.c | 8 +++++---
 src/lib/edc_parser.c | 5 +++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 2dc8a50..fc104b2 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -736,9 +736,11 @@ edit_cursor_double_clicked_cb(void *data, Evas_Object *obj,
    * Because right now any text inside quotes that placed after selection is
    * recognized as name.
    */
-   if ((!strncmp(selected, "image", 5)) ||  //5: sizeof("image")
-       (!strcmp(selected, "normal")) ||
-       (!strcmp(selected, "tween")))
+   if ((!strcmp(selected, "image") && (strlen(selected) == 5)) ||
+       (!strcmp(selected, "normal") && (strlen(selected) == 6)) ||
+       (!strcmp(selected, "tween") && (strlen(selected) == 5)) ||
+       (!strcmp(selected, "image.normal") && (strlen(selected) == 12)) ||
+       (!strcmp(selected, "image.tween") && (strlen(selected) == 11)))
      {
         int x, y;
         evas_pointer_output_xy_get(evas_object_evas_get(ed->en_edit), &x, &y);
diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index 7a4a9e2..410ea46 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -1525,6 +1525,11 @@ parser_name_get(parser_data *pd EINA_UNUSED, const char 
*cur)
    p++;
    end = strstr(p, "\"");
    if (!end) return NULL;
+
+   //Don't find if the name is in the next lines.
+   char *eol = strstr(cur, "\n");
+   if (eol < p) return NULL;
+
    return strndup(p, (end - p));
 }
 

-- 


Reply via email to