lv_label_no_break: fixes

This commit is contained in:
Gabor Kiss-Vamosi
2018-07-25 06:12:05 +02:00
parent 1fa77fa5d7
commit 818cd278b2
3 changed files with 13 additions and 5 deletions

View File

@@ -516,8 +516,10 @@ uint16_t lv_label_get_letter_on(lv_obj_t * label, lv_point_t * pos)
/*Search the line of the index letter */;
while(txt[line_start] != '\0') {
new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag);
if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/
y += letter_height + style->text.line_space;
if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/
y += letter_height + style->text.line_space;
line_start = new_line_start;
}