Evas textblock: Fixed a bug in line_coord_set with y<0.

SVN revision: 61344
This commit is contained in:
Tom Hacohen 2011-07-13 15:16:38 +00:00
parent edf4d4ee86
commit 70da0ccdbe
1 changed files with 10 additions and 1 deletions

View File

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