elm_entry: Do not set the cursor to next char if the end of line encounter 47/108447/3
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:29:41 +0000 (21:29 -0800)
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: I88029d34fc355b184a33f033b53df55f80d8150c

src/lib/elm_entry.c

index bb310125d1641b88d948acb5c9f1ef60cec9cf91..eb631fd040e359420ed704b6860ac96656645bbf 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);