fix selection when backscrolling and new content arrives

Thanks to Davide Andreoli for the bug report
This commit is contained in:
Boris Faure 2015-02-16 22:15:00 +01:00
parent feccb7bcab
commit f80d9634e3
1 changed files with 12 additions and 6 deletions

View File

@ -147,6 +147,7 @@ termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y)
if (start_y <= sel_start_y &&
sel_end_y <= end_y)
{
ty->selection.orig.y += direction;
ty->selection.start.y += direction;
ty->selection.end.y += direction;
sel_start_y += direction;
@ -157,12 +158,17 @@ termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y)
_sel_set(sd, EINA_FALSE);
}
}
else
if (!((start_y > sel_end_y) ||
(end_y < sel_start_y)))
{
_sel_set(sd, EINA_FALSE);
}
else if (!((start_y > sel_end_y) ||
(end_y < sel_start_y)))
{
_sel_set(sd, EINA_FALSE);
}
else if (sd->scroll > 0)
{
ty->selection.orig.y += direction;
ty->selection.start.y += direction;
ty->selection.end.y += direction;
}
}
if (sd->link.string)
{