From 2bd0d1381721a6728b93fdafb5414e5a3e47c801 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 9 Feb 2013 11:54:13 +0000 Subject: Take account of caret height when scrolling to show caret. --- desktop/textarea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/textarea.c b/desktop/textarea.c index bfa1327a2..4297da004 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -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. */ -- cgit v1.2.3