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:
parent
4cc57bdc41
commit
1ff02f570e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user