The trivial case of [pos,pos] (i.e. range of length 0) didn't work if there is a
format item in 'pos'.
The condition was fixed to not include such items. The reason it was not
apparent for text items is that these have further handling in the rest of the
code and would've been disposed of.
@fix
_ITEM_TEXT(it)->text_props.text_len
: 1;
if ((!cur1 || (cur1->pos < it->text_pos + item_len)) &&
- (!cur2 || (cur2->pos >= it->text_pos)))
+ (!cur2 || (cur2->pos > it->text_pos)))
{
if (!it1)
{
eina_iterator_free(it);
+ /* Check trivial case with format items */
+ evas_object_textblock_text_markup_set(tb, "abc<item size=32x32>efg");
+ evas_textblock_cursor_pos_set(cur, 3);
+ evas_textblock_cursor_pos_set(main_cur, 3);
+ it = evas_textblock_cursor_range_simple_geometry_get(cur, main_cur);
+ rects = eina_iterator_container_get(it);
+ ck_assert(!rects);
+ eina_iterator_free(it);
+
END_TB_TEST();
}
END_TEST