Don't show caret when scrolling a textarea that hasn't been given focus.

This commit is contained in:
Michael Drake 2013-03-27 13:46:57 +00:00
parent e2bcc5f5eb
commit 3529d39759
1 changed files with 2 additions and 1 deletions

View File

@ -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;