136
*/
137
public applyEdit(edit: StringEdit): IAnnotation<T>[] {
139
>
140
>
// treat edits as deletion of the replace range and then as insertion that extends the first range
141
>
const finalAnnotations: IAnnotation<T>[] = [];
142
>
const deletedAnnotations: IAnnotation<T>[] = [];
143
>
144
>
let offset = 0;
145
>
146
>
for (const e of edit.replacements) {
147
>
while (true) {
148
>
// ranges before the current edit
149
>
const annotation = annotations[0];
150
>
if (!annotation) {
151
break;
152
}