herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0c38846e33117bf622f04cbdc26143256c90352c

commit 0c38846e33117bf622f04cbdc26143256c90352c
Author: Daniel Hirt <daniel.h...@samsung.com>
Date:   Mon Jul 11 11:09:48 2016 +0000

    Canvas text: fix annotation set
    
    The cursor position was not set correctly to the respective fnode, causing
    annotation to not be applied correctly with text that has more than one
    paragraph.
---
 src/lib/evas/canvas/evas_object_textblock.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index f6fd8f6..0ab3162 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -12176,7 +12176,7 @@ _evas_textblock_cursor_format_item_geometry_get(const 
Efl_Canvas_Text_Cursor_Dat
    Evas_Object_Textblock_Item *it = NULL;
    Evas_Coord x, y, w, h;
 
-   if (!cur || !_evas_textblock_cursor_format_is_visible_get(cur)) return 
EINA_FALSE;
+   if (!cur) return EINA_FALSE;
    Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, 
EFL_CANVAS_OBJECT_CLASS);
    evas_object_async_block(obj);
    Efl_Canvas_Text_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
@@ -13705,9 +13705,8 @@ _textblock_cursor_pos_at_fnode_set(Eo *eo_obj 
EINA_UNUSED,
       Efl_Canvas_Text_Cursor_Data *cur,
       Evas_Object_Textblock_Node_Format *fnode)
 {
-   /* Get the relative offset to cur's text node */
-   size_t off = _evas_textblock_node_format_pos_get(fnode);
-   _evas_textblock_cursor_pos_set(cur, off);
+   cur->node = fnode->text_node;
+   cur->pos = _evas_textblock_node_format_pos_get(fnode);
 }
 
 static Eina_Bool

-- 


Reply via email to