forked from enlightenment/efl
Evas textblock: Fixed a bug in line_coord_set with y<0.
SVN revision: 61344
This commit is contained in:
parent
edf4d4ee86
commit
70da0ccdbe
|
@ -7735,7 +7735,6 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
|
|||
/* If we are after the last paragraph, use the last position in the
|
||||
* text. */
|
||||
evas_textblock_cursor_paragraph_last(cur);
|
||||
evas_textblock_cursor_char_next(cur);
|
||||
if (cur->node && cur->node->par)
|
||||
{
|
||||
line_no = cur->node->par->line_no;
|
||||
|
@ -7747,6 +7746,16 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
|
|||
}
|
||||
return line_no;
|
||||
}
|
||||
else if (y < 0)
|
||||
{
|
||||
int line_no = 0;
|
||||
evas_textblock_cursor_paragraph_first(cur);
|
||||
if (cur->node && cur->node->par)
|
||||
{
|
||||
line_no = cur->node->par->line_no;
|
||||
}
|
||||
return line_no;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue