Do not mask index in ClutterEntry
This commit is contained in:
parent
51ba12c9fd
commit
b8d6f3aaab
@ -325,17 +325,17 @@ static void
|
||||
clutter_entry_ensure_cursor_position (ClutterEntry *entry)
|
||||
{
|
||||
ClutterEntryPrivate *priv;
|
||||
gint index;
|
||||
gint index_;
|
||||
PangoRectangle rect;
|
||||
|
||||
priv = entry->priv;
|
||||
|
||||
if (priv->position == -1)
|
||||
index = strlen (priv->text);
|
||||
index_ = strlen (priv->text);
|
||||
else
|
||||
index = offset_to_bytes (priv->text, priv->position);
|
||||
index_ = offset_to_bytes (priv->text, priv->position);
|
||||
|
||||
pango_layout_get_cursor_pos (priv->layout, index, &rect, NULL);
|
||||
pango_layout_get_cursor_pos (priv->layout, index_, &rect, NULL);
|
||||
priv->cursor_pos.x = rect.x / PANGO_SCALE;
|
||||
priv->cursor_pos.y = rect.y / PANGO_SCALE;
|
||||
priv->cursor_pos.width = ENTRY_CURSOR_WIDTH;
|
||||
|
Loading…
Reference in New Issue
Block a user