evas_textblock : fixing bug of switch char : 57229
authorWooHyun Jung <wh0705.jung@samsung.com>
Tue, 22 Feb 2011 12:06:08 +0000 (21:06 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Tue, 22 Feb 2011 12:06:08 +0000 (21:06 +0900)
Change-Id: If613777624ab0d8a37111de40b5d89520a9cca46

src/lib/canvas/evas_object_textblock.c

index ee3f748..eb75d33 100644 (file)
@@ -4680,8 +4680,10 @@ evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
    if (!cur) return;
    if (!cur->node) return;
    index = eina_ustrbuf_length_get(cur->node->unicode) - 1;
-   cur->pos = index;
-
+   if (index >= 0)
+      cur->pos = index;
+   else
+      cur->pos = 0;
 }
 
 /**