Do not mask index in ClutterEntry
This commit is contained in:
parent
51ba12c9fd
commit
b8d6f3aaab
1 changed files with 4 additions and 4 deletions
|
@ -325,17 +325,17 @@ static void
|
||||||
clutter_entry_ensure_cursor_position (ClutterEntry *entry)
|
clutter_entry_ensure_cursor_position (ClutterEntry *entry)
|
||||||
{
|
{
|
||||||
ClutterEntryPrivate *priv;
|
ClutterEntryPrivate *priv;
|
||||||
gint index;
|
gint index_;
|
||||||
PangoRectangle rect;
|
PangoRectangle rect;
|
||||||
|
|
||||||
priv = entry->priv;
|
priv = entry->priv;
|
||||||
|
|
||||||
if (priv->position == -1)
|
if (priv->position == -1)
|
||||||
index = strlen (priv->text);
|
index_ = strlen (priv->text);
|
||||||
else
|
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.x = rect.x / PANGO_SCALE;
|
||||||
priv->cursor_pos.y = rect.y / PANGO_SCALE;
|
priv->cursor_pos.y = rect.y / PANGO_SCALE;
|
||||||
priv->cursor_pos.width = ENTRY_CURSOR_WIDTH;
|
priv->cursor_pos.width = ENTRY_CURSOR_WIDTH;
|
||||||
|
|
Loading…
Add table
Reference in a new issue