From a20a8071ed835496f26712093f0cfb72aabfd8c8 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 8 Mar 2011 17:30:04 +0000 Subject: [PATCH] clutter-text: Don't move the cursor to the left when at pos 0 When the cursor is at the leftmost position in the text the drawn pixel position is moved to the left by the size of the cursor. There's no explanation for why this happens and it doesn't seem to make any sense so this patch removes it. It makes multi-line texts looks odd because the cursor ends up at a different horizontal position when it is on the first line from any other line. It also makes using priv->cursor_pos difficult in any other part of the code because the paint function modifies it. The original patch that added this can be traced back to Tidy commit c356487c15. There's no explanation in the commit message either. http://bugzilla.clutter-project.org/show_bug.cgi?id=2599 --- clutter/clutter-text.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index ed321ad30..9e9a37f36 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -1394,9 +1394,6 @@ selection_paint (ClutterText *self) position = priv->position; - if (position == 0) - priv->cursor_pos.x -= priv->cursor_size; - if (position == priv->selection_bound) { /* No selection, just draw the cursor */