forked from enlightenment/efl
elm_code: Fix position calculations at line end
Addresses random NULLs in content after newline
This commit is contained in:
parent
b6d0ced5ec
commit
58c1e5bc82
|
@ -262,13 +262,13 @@ elm_code_line_text_position_for_column_get(Elm_Code_Line *line, unsigned int col
|
|||
else
|
||||
chars = line->content;
|
||||
|
||||
while ((unsigned int) count < column && index <= line->length)
|
||||
while ((unsigned int) count < column && index <= (int) line->length)
|
||||
{
|
||||
unicode = eina_unicode_utf8_next_get(chars, &index);
|
||||
if (unicode == 0)
|
||||
break;
|
||||
|
||||
if (unicode == '\t')
|
||||
if (unicode == 0)
|
||||
return line->length + 1;
|
||||
else if (unicode == '\t')
|
||||
count += elm_code_text_tabwidth_at_position(count, tabstop);
|
||||
else
|
||||
count++;
|
||||
|
|
Loading…
Reference in New Issue