elm_entry: Do not set the cursor to next char if the end of line encounter 63/108563/1
authorSubodhKumar <s7158.kumar@samsung.com>
Wed, 4 Jan 2017 09:59:57 +0000 (15:29 +0530)
committerThiep Ha <thiep.ha@samsung.com>
Thu, 5 Jan 2017 05:38:25 +0000 (14:38 +0900)
it captures newline char also in some scenario

Scenario: 1.Have an item image in entry
2.Make cursor after the item
3.Hit enter
4.Long press to select the item image
5.Observe

@tizen_fix

Change-Id: I10a574c266d04ed1db09065c62644c3c81966eda

src/lib/elm_entry.c

index 2045233..3ce0d13 100644 (file)
@@ -737,7 +737,10 @@ _select_word(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
                                         EDJE_CURSOR_MAIN, pos);
    edje_object_part_text_select_begin(sd->entry_edje, "elm.text");
    evas_textblock_cursor_word_end(cur);
-   evas_textblock_cursor_char_next(cur);
+   if (!evas_textblock_cursor_eol_get(cur))
+     {
+        evas_textblock_cursor_char_next(cur);
+     }
    pos = evas_textblock_cursor_pos_get(cur);
    edje_object_part_text_cursor_pos_set(sd->entry_edje, "elm.text",
                                         EDJE_CURSOR_MAIN, pos);