Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -1052,6 +1052,36 @@ suite('viewLineRenderer.renderLine 2', () => {
assert.deepEqual(actual.html, expected);
});
test('issue #32436: Non-monospace font + visible whitespace + After decorator causes line to "jump"', () => {
let lineContent = '\tbla';
let actual = renderViewLine(new RenderLineInput(
false,
lineContent,
false,
0,
[createPart(4, 3)],
[new LineDecoration(2, 3, 'before', true)],
4,
10,
-1,
'all',
false,
true
));
let expected = [
'<span>',
'<span class="vs-whitespace" style="width:40px">\u2192\u00a0\u00a0\u00a0</span>',
'<span class="mtk3 before">b</span>',
'<span class="mtk3">la</span>',
'</span>'
].join('');
assert.deepEqual(actual.html, expected);
});
test('issue #30133: Empty lines don\'t render inline decorations', () => {
let lineContent = '';
@@ -1080,6 +1110,33 @@ suite('viewLineRenderer.renderLine 2', () => {
assert.deepEqual(actual.html, expected);
});
test('issue #37208: Collapsing bullet point containing emoji in Markdown document results in [??] character', () => {
let actual = renderViewLine(new RenderLineInput(
true,
' 1. 🙏',
false,
0,
[createPart(7, 3)],
[new LineDecoration(7, 8, 'inline-folded', true)],
2,
10,
10000,
'none',
false,
false
));
let expected = [
'<span>',
'<span class="mtk3">\u00a0\u00a01.\u00a0</span>',
'<span class="mtk3 inline-folded">🙏</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,