discomfitor pushed a commit to branch evas-1.7.

commit 9b73dda677016fa52cf5228de53e78fbd722e14f
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Mar 28 18:51:18 2013 +0900

    fix word start/end logic to be consistent with other toolkits.
---
 ChangeLog                              | 9 +++++++++
 NEWS                                   | 1 +
 src/lib/canvas/evas_object_textblock.c | 4 ++--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 20e08ad..1ae7033 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1219,3 +1219,12 @@
 2013-02-23  ChunEon Park (Hermet)
 
         * Evas cache: remove the freed worker from the pthread worker list 
when it's failed to create a new thread so as not to access it if a thread is 
working newly.
+
+2013-03-28  Carsten Haitzler (The Rasterman)
+
+        * Change evas_textblock_cursor_word_start() and
+        evas_textblock_cursor_word_end() to walk extra whitespaces when
+        moving up and down words that tends to look more like other
+        toolkits (gtk, qt). the docs dont specifically say the rules
+        on word finding, so being consistent is better i believe and
+        so we can assume the prior behavior is a bug.
diff --git a/NEWS b/NEWS
index 77dcdbc..178dbe4 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Fixes:
     * Evas text: Fixed bug with the text object direction detection.
     * Evas font: Fixed font run detection for specific cases with 2 different 
fonts in the middle of a run.
     * Evas cache: remove the freed worker from the pthread worker list when 
it's failed to create a new thread so as not to access it if a thread is 
working newly.
+    * Fix evas word start/end find in textblock to be consistent with other 
toolkit logic on the matter
 
 Changes since Evas 1.7.5:
 -------------------------
diff --git a/src/lib/canvas/evas_object_textblock.c 
b/src/lib/canvas/evas_object_textblock.c
index 60891be..bb539b6 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -6772,7 +6772,7 @@ evas_textblock_cursor_word_start(Evas_Textblock_Cursor 
*cur)
      }
 #endif
 
-   i = cur->pos;
+   for (i = cur->pos; (BREAK_AFTER(i)) && (i >= 0); i--);
 
    for ( ; i > 0 ; i--)
      {
@@ -6813,7 +6813,7 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
      }
 #endif
 
-   i = cur->pos;
+   for (i = cur->pos; (BREAK_AFTER(i)) && (text[i]); i++);
 
    for ( ; text[i] ; i++)
      {

-- 

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2

Reply via email to