Evas textblock: Correct word start/end moving at new line or line begins with spaces
authorThiep Ha <thiepha@gmail.com>
Mon, 4 Aug 2014 10:01:51 +0000 (11:01 +0100)
committerTom Hacohen <tom@stosb.com>
Mon, 4 Aug 2014 10:01:51 +0000 (11:01 +0100)
commit104f04eda19395396116ba4c4c23b17f00ace2ae
treeff2a99cb8874bc0e5ca2c2dff06766608420bf92
parent8c677a1f0ea59a7403522d3252a3c886ed552b72
Evas textblock: Correct word start/end moving at new line or line begins with spaces

Summary:
Word start/end works incorrectly when it goes to new line or line begins with spaces.
Ex: In elementary_test/Entry, place cursor at the end of line, press ctrl + right arrow keys: cursor moves to begin of next line. In this case, cursor should move to end of 1st word in next line.
Ex2: In elementary_test/Entry, add some spaces to begin of 2nd line ("   uses markup"), place cursor at the first word ("uses"), press ctrl + left arrow keys twice, cursor moves to begin of 2nd line. In this case, cursor should move to begin of last word in 1st line.

This patch provides a fix by considerring next/previous text node to move cursor to correct place.

@fix

Reviewers: woohyun, raster, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1140
src/lib/evas/canvas/evas_object_textblock.c
src/tests/evas/evas_test_textblock.c