From 7a0b3475634642194b256ef3c4a294c72e312a18 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 15 Jan 2013 19:50:36 +0000 Subject: Add parentheses. --- desktop/textarea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/textarea.c b/desktop/textarea.c index 185a878d9..00c2ca4bc 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -1251,9 +1251,9 @@ void textarea_redraw(struct textarea *ta, int x, int y, colour bg, plot->clip(clip); - if (ta->sel_end == -1 || ta->sel_start == ta->sel_end && + if ((ta->sel_end == -1 || ta->sel_start == ta->sel_end) && ta->caret_pos.char_off >= 0) { - /* There is no selection; draw caret */ + /* There is no selection, and caret visible: draw caret */ int caret_y = y - ta->scroll_y + ta->caret_y + text_y_offset; int caret_height = caret_y + ta->line_height; -- cgit v1.2.3