From 3529d39759393135969b045be8e858cd15b6019e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 27 Mar 2013 13:46:57 +0000 Subject: [PATCH] Don't show caret when scrolling a textarea that hasn't been given focus. --- desktop/textarea.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/textarea.c b/desktop/textarea.c index f53d435a5..9b2e52bc0 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -691,7 +691,8 @@ static void textarea_scrollbar_callback(void *client_data, ta->callback(ta->data, &msg); if (!(ta->flags & TEXTAREA_INTERNAL_CARET) && - ta->sel_start == -1) { + ta->sel_start < 0 && + ta->caret_pos.byte_off >= 0) { /* Tell client where caret should be placed */ int x = ta->caret_x - ta->scroll_x; int y = ta->caret_y - ta->scroll_y;