From 932cd4602487a0dbe49d9e9ccbb90559a29fd790 Mon Sep 17 00:00:00 2001 From: tasn Date: Tue, 25 Jan 2011 02:56:14 +0000 Subject: [PATCH] Evas textblock: fixed in issue with the return value of evas_textblock_cursor_char_next which wasn't always correct. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@56295 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 83551d4..d40c462 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -4608,12 +4608,17 @@ evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) { if (!evas_textblock_cursor_paragraph_next(cur)) { + /* If we already were at the end, that means we don't have + * where to go next we should return FALSE */ + if (cur->pos == (size_t) index) + return EINA_FALSE; + cur->pos = index; return EINA_TRUE; } else { - return EINA_FALSE; + return EINA_TRUE; } } } -- 2.7.4