summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/box_textarea.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/render/box_textarea.c b/render/box_textarea.c
index d58f5ef1b..546a39e04 100644
--- a/render/box_textarea.c
+++ b/render/box_textarea.c
@@ -152,9 +152,17 @@ static void box_textarea_callback(void *data, struct textarea_msg *msg)
break;
case TEXTAREA_MSG_REDRAW_REQUEST:
- /* Redraw the textarea */
- /* TODO: don't redraw whole box, just the part asked for */
- html__redraw_a_box(html, box);
+ {
+ /* Request redraw of the required textarea rectangle */
+ int x, y;
+ box_coords(box, &x, &y);
+
+ content__request_redraw((struct content *)html,
+ x + msg->data.redraw.x0,
+ y + msg->data.redraw.y0,
+ msg->data.redraw.x1 - msg->data.redraw.x0,
+ msg->data.redraw.y1 - msg->data.redraw.y0);
+ }
break;
case TEXTAREA_MSG_SELECTION_REPORT: