Skip to content

Commit

Permalink
Merge branch 'master' into microsoftGH-37877-position-panel-left
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten authored Dec 18, 2019
2 parents ff66da8 + 71eb6ad commit f188c4c
Show file tree
Hide file tree
Showing 133 changed files with 2,567 additions and 1,541 deletions.
4 changes: 4 additions & 0 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
"name": "vs/workbench/contrib/emmet",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/experiments",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/extensions",
"project": "vscode-workbench"
Expand Down
4 changes: 4 additions & 0 deletions extensions/configuration-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
"fileMatch": "/.vscode/tasks.json",
"url": "vscode://schemas/tasks"
},
{
"fileMatch": "%APP_SETTINGS_HOME%/tasks.json",
"url": "vscode://schemas/tasks"
},
{
"fileMatch": "%APP_SETTINGS_HOME%/snippets/*.json",
"url": "vscode://schemas/snippets"
Expand Down
38 changes: 32 additions & 6 deletions extensions/html-language-features/client/src/mirrorCursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export function activateMirrorCursor(
return;
}

if (event.textEditor.document?.languageId !== 'html' && event.textEditor.document?.languageId !== 'handlebars') {
return;
}

prevCursors = cursors;
cursors = event.selections;

Expand All @@ -66,13 +70,13 @@ export function activateMirrorCursor(
if (event.selections[0].isEmpty) {
matchingTagPositionProvider(event.textEditor.document, event.selections[0].active).then(matchingTagPosition => {
if (matchingTagPosition && window.activeTextEditor) {
const charBeforeAndAfterPositionsRoughtlyEqual = isCharBeforeAndAfterPositionsRoughtlyEqual(
const charBeforeAndAfterPositionsRoughlyEqual = isCharBeforeAndAfterPositionsRoughlyEqual(
event.textEditor.document,
event.selections[0].anchor,
new Position(matchingTagPosition.line, matchingTagPosition.character)
);

if (charBeforeAndAfterPositionsRoughtlyEqual) {
if (charBeforeAndAfterPositionsRoughlyEqual) {
inMirrorMode = true;
const newCursor = new Selection(
matchingTagPosition.line,
Expand All @@ -93,6 +97,9 @@ export function activateMirrorCursor(
};

if (cursors.length === 2 && inMirrorMode) {
/**
* Both cursors are positions
*/
if (event.selections[0].isEmpty && event.selections[1].isEmpty) {
if (
prevCursors.length === 2 &&
Expand All @@ -103,13 +110,13 @@ export function activateMirrorCursor(
return;
}

const charBeforeAndAfterPositionsRoughtlyEqual = isCharBeforeAndAfterPositionsRoughtlyEqual(
const charBeforeAndAfterPositionsRoughlyEqual = isCharBeforeAndAfterPositionsRoughlyEqual(
event.textEditor.document,
event.selections[0].anchor,
event.selections[1].anchor
);

if (!charBeforeAndAfterPositionsRoughtlyEqual) {
if (!charBeforeAndAfterPositionsRoughlyEqual) {
exitMirrorMode();
return;
} else {
Expand All @@ -128,6 +135,25 @@ export function activateMirrorCursor(
workspace.applyEdit(cleanupEdit);
}
}
} else {
/**
* Both cursors are selections
*/
const charBeforeAndAfterAnchorPositionsRoughlyEqual = isCharBeforeAndAfterPositionsRoughlyEqual(
event.textEditor.document,
event.selections[0].anchor,
event.selections[1].anchor
);

const charBeforeAndAfterActivePositionsRoughlyEqual = isCharBeforeAndAfterPositionsRoughlyEqual(
event.textEditor.document,
event.selections[0].active,
event.selections[1].active
);

if (!charBeforeAndAfterAnchorPositionsRoughlyEqual || !charBeforeAndAfterActivePositionsRoughlyEqual) {
exitMirrorMode();
}
}
}
}
Expand All @@ -154,8 +180,8 @@ function getCharAfter(document: TextDocument, position: Position) {
}

// Check if chars before and after the two positions are equal
// For the chars before, `<` and `/` are consiered equal to handle the case of `<|></|>`
function isCharBeforeAndAfterPositionsRoughtlyEqual(document: TextDocument, firstPos: Position, secondPos: Position) {
// For the chars before, `<` and `/` are considered equal to handle the case of `<|></|>`
function isCharBeforeAndAfterPositionsRoughlyEqual(document: TextDocument, firstPos: Position, secondPos: Position) {
const charBeforePrimarySelection = getCharBefore(document, firstPos);
const charAfterPrimarySelection = getCharAfter(document, firstPos);
const charBeforeSecondarySelection = getCharBefore(document, secondPos);
Expand Down
13 changes: 12 additions & 1 deletion extensions/javascript/syntaxes/JavaScript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/2e0fded599d7b85b78692dee3d96e8a4710a5c57",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"patterns": [
Expand Down Expand Up @@ -3161,6 +3161,17 @@
"name": "keyword.operator.relational.js",
"match": "<=|>=|<>|<|>"
},
{
"match": "(\\!)\\s*(/)(?![/*])",
"captures": {
"1": {
"name": "keyword.operator.logical.js"
},
"2": {
"name": "keyword.operator.arithmetic.js"
}
}
},
{
"name": "keyword.operator.logical.js",
"match": "\\!|&&|\\|\\||\\?\\?"
Expand Down
13 changes: 12 additions & 1 deletion extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/2e0fded599d7b85b78692dee3d96e8a4710a5c57",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
"name": "JavaScript (with React support)",
"scopeName": "source.js.jsx",
"patterns": [
Expand Down Expand Up @@ -3161,6 +3161,17 @@
"name": "keyword.operator.relational.js.jsx",
"match": "<=|>=|<>|<|>"
},
{
"match": "(\\!)\\s*(/)(?![/*])",
"captures": {
"1": {
"name": "keyword.operator.logical.js.jsx"
},
"2": {
"name": "keyword.operator.arithmetic.js.jsx"
}
}
},
{
"name": "keyword.operator.logical.js.jsx",
"match": "\\!|&&|\\|\\||\\?\\?"
Expand Down
2 changes: 1 addition & 1 deletion extensions/typescript-basics/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "TypeScript-TmLanguage",
"repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage",
"commitHash": "2e0fded599d7b85b78692dee3d96e8a4710a5c57"
"commitHash": "c9c955af17ed0c86ebce32e0f26c72f0a2925937"
}
},
"license": "MIT",
Expand Down
13 changes: 12 additions & 1 deletion extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/2e0fded599d7b85b78692dee3d96e8a4710a5c57",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
"name": "TypeScript",
"scopeName": "source.ts",
"patterns": [
Expand Down Expand Up @@ -3210,6 +3210,17 @@
"name": "keyword.operator.relational.ts",
"match": "<=|>=|<>|<|>"
},
{
"match": "(\\!)\\s*(/)(?![/*])",
"captures": {
"1": {
"name": "keyword.operator.logical.ts"
},
"2": {
"name": "keyword.operator.arithmetic.ts"
}
}
},
{
"name": "keyword.operator.logical.ts",
"match": "\\!|&&|\\|\\||\\?\\?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/2e0fded599d7b85b78692dee3d96e8a4710a5c57",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/c9c955af17ed0c86ebce32e0f26c72f0a2925937",
"name": "TypeScriptReact",
"scopeName": "source.tsx",
"patterns": [
Expand Down Expand Up @@ -3161,6 +3161,17 @@
"name": "keyword.operator.relational.tsx",
"match": "<=|>=|<>|<|>"
},
{
"match": "(\\!)\\s*(/)(?![/*])",
"captures": {
"1": {
"name": "keyword.operator.logical.tsx"
},
"2": {
"name": "keyword.operator.arithmetic.tsx"
}
}
},
{
"name": "keyword.operator.logical.tsx",
"match": "\\!|&&|\\|\\||\\?\\?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class MyCompletionItem extends vscode.CompletionItem {
case PConst.Kind.memberSetAccessor:
return vscode.CompletionItemKind.Field;
case PConst.Kind.function:
case PConst.Kind.localFunction:
return vscode.CompletionItemKind.Function;
case PConst.Kind.memberFunction:
case PConst.Kind.constructSignature:
Expand Down
1 change: 0 additions & 1 deletion extensions/typescript-language-features/src/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ testRunner.configure({
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'), // colored output from test results (only windows cannot handle)
timeout: 60000,
grep: 'References'
});

export = testRunner;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
"@types/iconv-lite": "0.0.1",
"@types/keytar": "^4.4.0",
"@types/mocha": "2.2.39",
"@types/node": "^10.12.12",
"@types/node": "^12.11.7",
"@types/sinon": "^1.16.36",
"@types/vscode-windows-registry": "^1.0.0",
"@types/webpack": "^4.4.10",
"@types/windows-foreground-love": "^0.3.0",
"@types/windows-mutex": "^0.4.0",
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"./vs"
],
"exclude": [
"./typings/es6-promise.d.ts",
"./typings/require-monaco.d.ts",
"./typings/xterm.d.ts",
"./typings/xterm-addon-search.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/typings/lib.ie11_safe_es6.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Map<K, V> {

interface MapConstructor {
new <K, V>(): Map<K, V>;
prototype: Map<any, any>;
readonly prototype: Map<any, any>;

// not supported on IE11:
// new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
Expand All @@ -51,7 +51,7 @@ interface Set<T> {

interface SetConstructor {
new <T>(): Set<T>;
prototype: Set<any>;
readonly prototype: Set<any>;

// not supported on IE11:
// new <T>(iterable: Iterable<T>): Set<T>;
Expand Down
9 changes: 0 additions & 9 deletions src/typings/vscode-windows-registry.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/vs/base/common/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function createCancelablePromise<T>(callback: (token: CancellationToken)
});
});

return new class implements CancelablePromise<T> {
return <CancelablePromise<T>>new class {
cancel() {
source.cancel();
}
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/node/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CharCode } from 'vs/base/common/charCode';
* - forEach() over the result to get the lines
*/
export class LineDecoder {
private stringDecoder: sd.NodeStringDecoder;
private stringDecoder: sd.StringDecoder;
private remaining: string | null;

constructor(encoding: string = 'utf8') {
Expand Down
10 changes: 5 additions & 5 deletions src/vs/base/parts/quickopen/test/browser/quickopen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as assert from 'assert';
import { QuickOpenModel, QuickOpenEntry, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel';
import { DataSource } from 'vs/base/parts/quickopen/browser/quickOpenViewer';
Expand All @@ -28,7 +29,7 @@ suite('QuickOpen', () => {
assert.equal(entry2, model.getEntries(true)[0]);
});

test('QuickOpenDataSource', () => {
test('QuickOpenDataSource', async () => {
const model = new QuickOpenModel();

const entry1 = new QuickOpenEntry();
Expand All @@ -42,8 +43,7 @@ suite('QuickOpen', () => {
assert.equal(true, ds.hasChildren(null!, model));
assert.equal(false, ds.hasChildren(null!, entry1));

ds.getChildren(null!, model).then((children: any[]) => {
assert.equal(3, children.length);
});
const children = await ds.getChildren(null!, model);
assert.equal(3, children.length);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -833,4 +833,4 @@ suite('Quick Open Scorer', () => {
assert.equal(scorer.prepareQuery('ModelTester.ts').containsPathSeparator, false);
assert.equal(scorer.prepareQuery('Model' + sep + 'Tester.ts').containsPathSeparator, true);
});
});
});
3 changes: 2 additions & 1 deletion src/vs/base/test/browser/progressBar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as assert from 'assert';
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar';

Expand All @@ -28,4 +29,4 @@ suite('ProgressBar', () => {

bar.dispose();
});
});
});
1 change: 1 addition & 0 deletions src/vs/base/test/common/assert.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as assert from 'assert';
import { ok } from 'vs/base/common/assert';

Expand Down
1 change: 0 additions & 1 deletion src/vs/base/test/common/collections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import * as assert from 'assert';
import * as collections from 'vs/base/common/collections';


suite('Collections', () => {

test('forEach', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/test/common/extpath.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as assert from 'assert';
import * as extpath from 'vs/base/common/extpath';
import * as platform from 'vs/base/common/platform';
Expand All @@ -28,7 +29,6 @@ suite('Paths', () => {
assert.equal(extpath.getRoot('http://www/'), 'http://www/');
assert.equal(extpath.getRoot('file:///foo'), 'file:///');
assert.equal(extpath.getRoot('file://foo'), '');

});

test('isUNC', () => {
Expand Down
Loading

0 comments on commit f188c4c

Please sign in to comment.