summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-03-27 21:43:19 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-03-27 21:43:19 +0000
commitb16cfd2d6edf20a31613f421582f528a93c40e41 (patch)
tree7d78b2c22b452b1694196f00f00ded3e6a87162a /desktop
parent7738584b3411fa0941579831deae388139eb7a5a (diff)
downloadnetsurf-b16cfd2d6edf20a31613f421582f528a93c40e41.tar.gz
netsurf-b16cfd2d6edf20a31613f421582f528a93c40e41.tar.bz2
Fix #0002097, with thanks to Achal-Aggarwal for tracking this down.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/textarea.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 584642d07..bd35a5ec4 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -1780,13 +1780,14 @@ static void textarea_setup_text_offsets(struct textarea *ta)
if (ta->flags & TEXTAREA_MULTILINE) {
/* Multiline textarea */
text_y_offset += ta->pad_top;
- text_y_offset_baseline += (ta->line_height * 3 + 2) / 4 +
- ta->pad_top;
+ text_y_offset_baseline +=
+ (ta->line_height * 3 + 2) / 4 + ta->pad_top;
} else {
/* Single line text area; text is vertically centered */
int vis_height = ta->vis_height - 2 * ta->border_width;
text_y_offset += (vis_height - ta->line_height + 1) / 2;
- text_y_offset_baseline += (vis_height * 3 + 2) / 4;
+ text_y_offset_baseline +=
+ (2 * vis_height + ta->line_height + 2) / 4;
}
ta->text_y_offset = text_y_offset;