提交 c1f3758a 编写于 作者: J Johannes Rieken

fix #42968

上级 5a915525
......@@ -23,6 +23,7 @@ import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'
import { IWordAtPosition, EndOfLineSequence } from 'vs/editor/common/model';
import { globals } from 'vs/base/common/platform';
import { Iterator } from 'vs/base/common/iterator';
import { mergeSort } from 'vs/base/common/arrays';
export interface IMirrorModel {
readonly uri: URI;
......@@ -374,6 +375,8 @@ export abstract class BaseEditorSimpleWorker {
const result: TextEdit[] = [];
let lastEol: EndOfLineSequence;
edits = mergeSort(edits, (a, b) => Range.compareRangesUsingStarts(a.range, b.range));
for (let { range, text, eol } of edits) {
if (typeof eol === 'number') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册