summaryrefslogtreecommitdiff
path: root/desktop/textarea.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r--desktop/textarea.c4
1 files changed, 2 insertions, 2 deletions
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. */