Fix use of x values when y is required.

This commit is contained in:
Michael Drake 2013-02-09 13:18:16 +00:00
parent 7fa8f30f44
commit f848de3dd0
1 changed files with 2 additions and 2 deletions

View File

@ -317,8 +317,8 @@ static bool textarea_scroll_visible(struct textarea *ta)
/* Adjust scroll pos for reduced extents */ /* Adjust scroll pos for reduced extents */
vis = ta->vis_height - 2 * ta->border_width; vis = ta->vis_height - 2 * ta->border_width;
if (ta->v_extent - xs < vis) if (ta->v_extent - ys < vis)
xs -= vis - (ta->v_extent - xs); ys -= vis - (ta->v_extent - ys);
/* Get caret pos on screen */ /* Get caret pos on screen */
y = ta->caret_y - ys; y = ta->caret_y - ys;