newlog->data.ins.beg = beg;
newlog->data.ins.end = end;
newlog->next = *list;
+ if (log) log->locked = true;
*list = newlog;
} else if (beg <= log->data.ins.beg) {
log->data.ins.beg--;
for (size_t i = 0; i < len; i++)
newlog->data.del.runes[i] = r[i];
newlog->next = *list;
+ if (log) log->locked = true;
*list = newlog;
} else if (off == log->data.del.off) {
log->data.del.len++;
*from = log->next;
/* invert the log type and move it to the destination */
Log* newlog = (Log*)calloc(sizeof(Log), 1);
+ newlog->locked = true;
if (log->insert) {
newlog->insert = false;
size_t n = (log->data.ins.end - log->data.ins.beg);