summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/textarea.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 31effdc3c..0f42a9f30 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -1058,12 +1058,12 @@ void textarea_redraw(struct textarea *ta, int x, int y,
/* There is no selection and caret is in horizontal
* clip range. */
int caret_height = ta->line_height - 1;
- y += ta->caret_y + text_y_offset;
- if (y + caret_height >= clip->y0 && y <= clip->y1)
+ r.y0 = y + ta->caret_y + text_y_offset;
+ if (r.y0 + caret_height >= clip->y0 && r.y0 <= clip->y1)
/* Caret in vertical clip range; plot */
- plot->line(x + ta->caret_x, y + ta->caret_y,
+ plot->line(x + ta->caret_x, r.y0,
x + ta->caret_x,
- y + ta->caret_y + caret_height,
+ r.y0 + caret_height,
&pstyle_stroke_caret);
}
}
@@ -1082,7 +1082,6 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
line = ta->caret_pos.line;
readonly = (ta->flags & TEXTAREA_READONLY ? true:false);
-
if (!(key <= 0x001F || (0x007F <= key && key <= 0x009F))) {
/* normal character insertion */
length = utf8_from_ucs4(key, utf8);