Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -1792,27 +1792,33 @@ function createDecoration(startLineNumber: number, startColumn: number, endLineN
const DECORATIONS = {
charDelete: ModelDecorationOptions.register({
description: 'diff-editor-char-delete',
className: 'char-delete'
}),
charDeleteWholeLine: ModelDecorationOptions.register({
description: 'diff-editor-char-delete-whole-line',
className: 'char-delete',
isWholeLine: true
}),
charInsert: ModelDecorationOptions.register({
description: 'diff-editor-char-insert',
className: 'char-insert'
}),
charInsertWholeLine: ModelDecorationOptions.register({
description: 'diff-editor-char-insert-whole-line',
className: 'char-insert',
isWholeLine: true
}),
lineInsert: ModelDecorationOptions.register({
description: 'diff-editor-line-insert',
className: 'line-insert',
marginClassName: 'line-insert',
isWholeLine: true
}),
lineInsertWithSign: ModelDecorationOptions.register({
description: 'diff-editor-line-insert-with-sign',
className: 'line-insert',
linesDecorationsClassName: 'insert-sign ' + ThemeIcon.asClassName(diffInsertIcon),
marginClassName: 'line-insert',
@@ -1820,11 +1826,13 @@ const DECORATIONS = {
}),
lineDelete: ModelDecorationOptions.register({
description: 'diff-editor-line-delete',
className: 'line-delete',
marginClassName: 'line-delete',
isWholeLine: true
}),
lineDeleteWithSign: ModelDecorationOptions.register({
description: 'diff-editor-line-delete-with-sign',
className: 'line-delete',
linesDecorationsClassName: 'delete-sign ' + ThemeIcon.asClassName(diffRemoveIcon),
marginClassName: 'line-delete',
@@ -1832,6 +1840,7 @@ const DECORATIONS = {
}),
lineDeleteMargin: ModelDecorationOptions.register({
description: 'diff-editor-line-delete-margin',
marginClassName: 'line-delete',
})
@@ -2521,8 +2530,7 @@ class InlineViewZonesComputer extends ViewZonesComputer {
marginDomNode.appendChild(marginElement);
}
const absoluteOffsets = output.characterMapping.getAbsoluteOffsets();
return absoluteOffsets.length > 0 ? absoluteOffsets[absoluteOffsets.length - 1] : 0;
return output.characterMapping.getAbsoluteOffset(output.characterMapping.length);
}
}