Merge branch 'michaelweghorn/a11y_convert_negative_index_on_text_deletion' into 'main'

a11y: Convert negative text deletion index to actual offset

Closes #6149

See merge request GNOME/gtk!6473
This commit is contained in:
Matthias Clasen 2023-10-11 19:32:11 +00:00
commit 44daa847ff

View File

@ -1629,6 +1629,10 @@ delete_text_cb (GtkEditable *editable,
return;
text = gtk_editable_get_chars (editable, start, end);
if (end < 0)
end = g_utf8_strlen(text, -1);
changed->text_changed (changed->data, "delete", start, end - start, text);
g_free (text);
}