mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #153124 from microsoft/3wm
This commit is contained in:
@@ -411,7 +411,13 @@ function editsToLineRangeEdit(range: LineRange, sortedEdits: RangeEdit[], textMo
|
||||
if (!currentPosition.isBeforeOrEqual(diffStart)) {
|
||||
return undefined;
|
||||
}
|
||||
const originalText = textModel.getValueInRange(Range.fromPositions(currentPosition, diffStart));
|
||||
let originalText = textModel.getValueInRange(Range.fromPositions(currentPosition, diffStart));
|
||||
if (diffStart.lineNumber > textModel.getLineCount()) {
|
||||
// assert diffStart.lineNumber === textModel.getLineCount() + 1
|
||||
// getValueInRange doesn't include this virtual line break, as the document ends the line before.
|
||||
// endsLineAfter will be false.
|
||||
originalText += '\n';
|
||||
}
|
||||
text += originalText;
|
||||
text += edit.newText;
|
||||
currentPosition = edit.range.getEndPosition();
|
||||
|
||||
Reference in New Issue
Block a user