Navigation Menu

Skip to content

Commit

Permalink
fix(label) do not bidi process text in lv_label_ins_text
Browse files Browse the repository at this point in the history
related to #2712
  • Loading branch information
kisvegabor committed Oct 26, 2021
1 parent 9c7338c commit e95efc1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/widgets/lv_label.c
Expand Up @@ -656,18 +656,7 @@ void lv_label_ins_text(lv_obj_t * obj, uint32_t pos, const char * txt)
pos = _lv_txt_get_encoded_length(label->text);
}

#if LV_USE_BIDI
char * bidi_buf = lv_mem_buf_get(ins_len + 1);
LV_ASSERT_MALLOC(bidi_buf);
if(bidi_buf == NULL) return;

_lv_bidi_process(txt, bidi_buf, lv_obj_get_style_base_dir(obj, LV_PART_MAIN));
_lv_txt_ins(label->text, pos, bidi_buf);

lv_mem_buf_release(bidi_buf);
#else
_lv_txt_ins(label->text, pos, txt);
#endif
lv_label_set_text(obj, NULL);
}

Expand Down

0 comments on commit e95efc1

Please sign in to comment.