Changeset: Replace appendATextToAssembler() with a generator

This commit is contained in:
Richard Hansen 2021-10-25 01:16:46 -04:00
parent 9cd59a84af
commit d74dd235a4
5 changed files with 26 additions and 10 deletions

View file

@ -530,7 +530,7 @@ function Ace2Inner(editorInfo, cssManagers) {
o.chars = lastLineLength;
o.lines = 0;
assem.append(o);
Changeset.appendATextToAssembler(atext, assem);
for (const op of Changeset.opsFromAText(atext)) assem.append(op);
const newLen = oldLen + assem.getLengthChange();
const changeset = Changeset.checkRep(
Changeset.pack(oldLen, newLen, assem.toString(), atext.text.slice(0, -1)));