forked from enlightenment/efl
Evas textblock: Fixed a selection bug introduced in my previous commit.
I matched against the wrong values so it never included items in the middle even when needed. SVN revision: 83869
This commit is contained in:
parent
179fd31b77
commit
3974cb3dc1
|
@ -9574,7 +9574,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
|
|||
|
||||
while (it && (it != it2))
|
||||
{
|
||||
if ((start <= it->text_pos) && (it->text_pos <= end))
|
||||
if ((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos))
|
||||
{
|
||||
max_x = it->x + it->adv;
|
||||
}
|
||||
|
|
|
@ -1433,6 +1433,18 @@ START_TEST(evas_textblock_geometries)
|
|||
|
||||
fail_if(eina_list_count(rects) != 2);
|
||||
|
||||
EINA_LIST_FREE(rects, tr)
|
||||
free(tr);
|
||||
|
||||
/* Same run different styles */
|
||||
evas_object_textblock_text_markup_set(tb, "test<b>test2</b>test3");
|
||||
|
||||
evas_textblock_cursor_pos_set(cur, 3);
|
||||
evas_textblock_cursor_pos_set(main_cur, 11);
|
||||
rects = evas_textblock_cursor_range_geometry_get(cur, main_cur);
|
||||
|
||||
fail_if(eina_list_count(rects) != 3);
|
||||
|
||||
EINA_LIST_FREE(rects, tr)
|
||||
free(tr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue