Take account of caret height when scrolling to show caret.

This commit is contained in:
Michael Drake 2013-02-09 11:54:13 +00:00
parent 688e1b0e4f
commit 2bd0d13817

View File

@ -326,8 +326,8 @@ static bool textarea_scroll_visible(struct textarea *ta)
/* scroll as required */
if (y < y0)
ys += (y - y0);
else if (y > y1)
ys += (y - y1);
else if (y + ta->line_height > y1)
ys += (y + ta->line_height - y1);
if (ys != ta->scroll_y && ta->bar_y != NULL) {
/* Scrolled, set new pos. */