forked from enlightenment/efl
evas/text: fix abnormal ellipsis logic when harfbuzz is enabled.
Summary: text_props.len indicates visual length from harfbuzz logic when it is available. But, input pram "idx" is logical length. So, ellipsis works abnormally in some case. @fix Test Plan: D870 Reviewers: tasn, woohyun CC: cedric, herdsman Differential Revision: https://phab.enlightenment.org/D871
This commit is contained in:
parent
e4158510bd
commit
bc70a1bd84
|
@ -636,7 +636,7 @@ static Eina_Bool
|
||||||
_layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Text_Data *o, Evas_Object_Text_Item *ti, int idx, Eina_Bool want_start)
|
_layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Text_Data *o, Evas_Object_Text_Item *ti, int idx, Eina_Bool want_start)
|
||||||
{
|
{
|
||||||
Evas_Text_Props new_text_props;
|
Evas_Text_Props new_text_props;
|
||||||
if (idx >= (int) ti->text_props.len)
|
if (idx >= (int) ti->text_props.text_len)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
memset(&new_text_props, 0, sizeof (new_text_props));
|
memset(&new_text_props, 0, sizeof (new_text_props));
|
||||||
|
|
Loading…
Reference in New Issue