Fix use of x values when y is required.
This commit is contained in:
parent
7fa8f30f44
commit
f848de3dd0
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue