Fix modifications tracking in Ui::Text::String.

This commit is contained in:
John Preston 2023-11-10 16:46:06 +04:00
parent 85b25a109d
commit 024f438ce5

View file

@ -787,7 +787,8 @@ bool String::removeSkipBlock() {
void String::insertModifications(int position, int delta) {
auto &modifications = ensureExtended()->modifications;
auto i = end(modifications);
while (i != begin(modifications) && (--i)->position >= position) {
while (i != begin(modifications) && (i - 1)->position >= position) {
--i;
if (i->position < position) {
break;
} else if (delta > 0) {