Initial VS Code 1.19 source merge (#571)

* Initial 1.19 xcopy

* Fix yarn build

* Fix numerous build breaks

* Next batch of build break fixes

* More build break fixes

* Runtime breaks

* Additional post merge fixes

* Fix windows setup file

* Fix test failures.

* Update license header blocks to refer to source eula
This commit is contained in:
Karl Burtram
2018-01-28 23:37:17 -08:00
committed by GitHub
parent 9a1ac20710
commit 251ae01c3e
8009 changed files with 93378 additions and 35634 deletions

View File

@@ -10,6 +10,7 @@ import { ViewLineToken } from 'vs/editor/common/core/viewLineToken';
import { CharCode } from 'vs/base/common/charCode';
import { MetadataConsts } from 'vs/editor/common/modes';
import { LineDecoration } from 'vs/editor/common/viewLayout/lineDecorations';
import { InlineDecorationType } from 'vs/editor/common/viewModel/viewModel';
suite('viewLineRenderer.renderLine', () => {
@@ -700,7 +701,7 @@ suite('viewLineRenderer.renderLine 2', () => {
false,
0,
[createPart(21, 3)],
[new LineDecoration(1, 22, 'link', false)],
[new LineDecoration(1, 22, 'link', InlineDecorationType.Regular)],
4,
10,
-1,
@@ -735,7 +736,7 @@ suite('viewLineRenderer.renderLine 2', () => {
createPart(84, 6),
],
[
new LineDecoration(13, 51, 'detected-link', false)
new LineDecoration(13, 51, 'detected-link', InlineDecorationType.Regular)
],
4,
10,
@@ -993,9 +994,9 @@ suite('viewLineRenderer.renderLine 2', () => {
0,
[createPart(11, 0)],
[
new LineDecoration(5, 7, 'a', false),
new LineDecoration(1, 3, 'b', false),
new LineDecoration(2, 8, 'c', false),
new LineDecoration(5, 7, 'a', InlineDecorationType.Regular),
new LineDecoration(1, 3, 'b', InlineDecorationType.Regular),
new LineDecoration(2, 8, 'c', InlineDecorationType.Regular),
],
4,
10,
@@ -1033,7 +1034,7 @@ suite('viewLineRenderer.renderLine 2', () => {
false,
0,
[createPart(4, 3)],
[new LineDecoration(1, 2, 'before', true)],
[new LineDecoration(1, 2, 'before', InlineDecorationType.Before)],
4,
10,
-1,
@@ -1062,7 +1063,7 @@ suite('viewLineRenderer.renderLine 2', () => {
false,
0,
[createPart(4, 3)],
[new LineDecoration(2, 3, 'before', true)],
[new LineDecoration(2, 3, 'before', InlineDecorationType.Before)],
4,
10,
-1,
@@ -1092,7 +1093,7 @@ suite('viewLineRenderer.renderLine 2', () => {
false,
0,
[createPart(0, 3)],
[new LineDecoration(1, 2, 'before', true)],
[new LineDecoration(1, 2, 'before', InlineDecorationType.Before)],
4,
10,
-1,
@@ -1103,7 +1104,7 @@ suite('viewLineRenderer.renderLine 2', () => {
let expected = [
'<span>',
'<span class="before">\u00a0</span>',
'<span class="before"></span>',
'</span>'
].join('');
@@ -1118,7 +1119,7 @@ suite('viewLineRenderer.renderLine 2', () => {
false,
0,
[createPart(7, 3)],
[new LineDecoration(7, 8, 'inline-folded', true)],
[new LineDecoration(7, 8, 'inline-folded', InlineDecorationType.After)],
2,
10,
10000,
@@ -1137,6 +1138,65 @@ suite('viewLineRenderer.renderLine 2', () => {
assert.deepEqual(actual.html, expected);
});
test('issue #37401: Allow both before and after decorations on empty line', () => {
let actual = renderViewLine(new RenderLineInput(
true,
'',
false,
0,
[createPart(0, 3)],
[
new LineDecoration(1, 2, 'before', InlineDecorationType.Before),
new LineDecoration(0, 1, 'after', InlineDecorationType.After),
],
2,
10,
10000,
'none',
false,
false
));
let expected = [
'<span>',
'<span class="before after"></span>',
'</span>'
].join('');
assert.deepEqual(actual.html, expected);
});
test('issue #38935: GitLens end-of-line blame no longer rendering', () => {
let actual = renderViewLine(new RenderLineInput(
true,
'\t}',
false,
0,
[createPart(2, 3)],
[
new LineDecoration(3, 3, 'ced-TextEditorDecorationType2-5e9b9b3f-3 ced-TextEditorDecorationType2-3', InlineDecorationType.Before),
new LineDecoration(3, 3, 'ced-TextEditorDecorationType2-5e9b9b3f-4 ced-TextEditorDecorationType2-4', InlineDecorationType.After),
],
4,
10,
10000,
'none',
false,
false
));
let expected = [
'<span>',
'<span class="mtk3">\u00a0\u00a0\u00a0\u00a0}</span>',
'<span class="ced-TextEditorDecorationType2-5e9b9b3f-3 ced-TextEditorDecorationType2-3 ced-TextEditorDecorationType2-5e9b9b3f-4 ced-TextEditorDecorationType2-4"></span>',
'</span>'
].join('');
assert.deepEqual(actual.html, expected);
});
function createTestGetColumnOfLinePartOffset(lineContent: string, tabSize: number, parts: ViewLineToken[], expectedPartLengths: number[]): (partIndex: number, partLength: number, offset: number, expected: number) => void {
let renderLineOutput = renderViewLine(new RenderLineInput(
false,