projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d30603e
)
Evas textblock: Fixed cursor_paragraph_text_length_get.
author
Tom Hacohen
<tom@stosb.com>
Sun, 10 Jul 2011 13:22:38 +0000
(13:22 +0000)
committer
Tom Hacohen
<tom@stosb.com>
Sun, 10 Jul 2011 13:22:38 +0000
(13:22 +0000)
SVN revision: 61206
legacy/evas/src/lib/canvas/evas_object_textblock.c
patch
|
blob
|
history
diff --git
a/legacy/evas/src/lib/canvas/evas_object_textblock.c
b/legacy/evas/src/lib/canvas/evas_object_textblock.c
index
550a24b
..
9057744
100644
(file)
--- a/
legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/
legacy/evas/src/lib/canvas/evas_object_textblock.c
@@
-7222,9
+7222,15
@@
evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
EAPI int
evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur)
{
+ int len;
if (!cur) return -1;
if (!cur->node) return -1;
- return eina_ustrbuf_length_get(cur->node->unicode);
+ len = eina_ustrbuf_length_get(cur->node->unicode);
+
+ if (EINA_INLIST_GET(cur->node)->next)
+ return len - 1; /* Remove the paragraph separator */
+ else
+ return len;
}
EAPI const Evas_Object_Textblock_Node_Format *