From 580e05a0e1531d86d5229ade4ced2c336fbce634 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 29 Oct 2021 10:51:26 +0200 Subject: [PATCH] fix(label) update lv_label_get_letter_pos to work with LV_BASE_DIR_AUTO too related to #2712 --- src/widgets/lv_label.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/lv_label.c b/src/widgets/lv_label.c index 9be2f96aa..be45ff325 100644 --- a/src/widgets/lv_label.c +++ b/src/widgets/lv_label.c @@ -349,6 +349,8 @@ void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t uint32_t visual_byte_pos; #if LV_USE_BIDI lv_base_dir_t base_dir = lv_obj_get_style_base_dir(obj, LV_PART_MAIN); + if(base_dir == LV_BASE_DIR_AUTO) base_dir = _lv_bidi_detect_base_dir(txt); + char * mutable_bidi_txt = NULL; /*Handle Bidi*/ if(new_line_start == byte_id) {