forked from enlightenment/efl
Evas textblock: Fixed a bug with deletion of ranges.
Fixed a bug with deletion of ranges that end just before a visual format. Thanks to WooHyun Jung for reporting.
This commit is contained in:
parent
d77a7bb39b
commit
3f3ad67616
|
@ -1,3 +1,7 @@
|
|||
2013-04-15 Tom Hacohen
|
||||
* Evas textblock: Fixed a bug with deletion of ranges that end just
|
||||
before a visual format.
|
||||
|
||||
2013-04-14 Jiyoun Park
|
||||
|
||||
* Evas: fix gif bug related with scale down decode.
|
||||
|
|
1
NEWS
1
NEWS
|
@ -242,4 +242,5 @@ Fixes:
|
|||
* Evas: Don't update evas update area by the clipper if the image obj visible is changed.
|
||||
* Evas: fix gif decoding bug related with background color.
|
||||
* Evas: fix gif bug related with scale down decode.
|
||||
* Evas textblock: Fixed a bug with deletion of ranges that end just a visual format.
|
||||
|
||||
|
|
|
@ -7545,6 +7545,11 @@ _evas_textblock_node_text_adjust_offsets_to_start(Evas_Object_Textblock *o,
|
|||
last_node->offset -= delta;
|
||||
break;
|
||||
}
|
||||
else if (use_end && itr && (pos + itr->offset >= (size_t) end) &&
|
||||
itr->visible)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
delta = orig_end - pos;
|
||||
if (!first)
|
||||
|
|
|
@ -1218,6 +1218,13 @@ START_TEST(evas_textblock_format_removal)
|
|||
fnode = evas_textblock_node_format_first_get(tb);
|
||||
fail_if (fnode);
|
||||
|
||||
/* Range delete with empty paragraphs. */
|
||||
evas_object_textblock_text_markup_set(tb, "<ps/><ps/><ps/><ps/><ps/>");
|
||||
evas_textblock_cursor_pos_set(cur, 2);
|
||||
evas_textblock_cursor_pos_set(main_cur, 3);
|
||||
evas_textblock_cursor_range_delete(cur, main_cur);
|
||||
ck_assert_str_eq(evas_object_textblock_text_markup_get(tb), "<ps/><ps/><ps/><ps/>");
|
||||
|
||||
/* Verify fmt position and REP_CHAR positions are the same */
|
||||
evas_object_textblock_text_markup_set(tb,
|
||||
"This is<ps/>an <item absize=93x152 vsize=ascent></>a.");
|
||||
|
|
Loading…
Reference in New Issue