Use the stored contents length in ::delete_chars()

Instead of recomputing it, we can reuse the contents length we
compute and store inside clutter_text_set_text().
This commit is contained in:
Emmanuele Bassi 2008-12-11 11:50:02 +00:00
parent 4cc57bdc41
commit 1ff02f570e

View File

@ -2962,7 +2962,7 @@ clutter_text_delete_chars (ClutterText *self,
if (priv->position == -1)
{
num_pos = offset_to_bytes (priv->text, len - n_chars);
num_pos = offset_to_bytes (priv->text, priv->n_chars - n_chars);
new = g_string_erase (new, num_pos, -1);
}
else