fix(label) do not bidi process text in lv_label_ins_text

related to #2712
This commit is contained in:
Gabor Kiss-Vamosi
2021-10-26 14:21:34 +02:00
parent 9c7338c90b
commit e95efc152f

View File

@@ -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);
}