Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -38,8 +38,17 @@ const HOVER_MESSAGE_COMMAND_META = new MarkdownString().appendText(
: nls.localize('links.command', "Ctrl + click to execute command")
);
const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(nls.localize('links.navigate.al', "Alt + click to follow link"));
const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(nls.localize('links.command.al', "Alt + click to execute command"));
const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(
platform.isMacintosh
? nls.localize('links.navigate.al.mac', "Option + click to follow link")
: nls.localize('links.navigate.al', "Alt + click to follow link")
);
const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(
platform.isMacintosh
? nls.localize('links.command.al.mac', "Option + click to execute command")
: nls.localize('links.command.al', "Alt + click to execute command")
);
const decoration = {
meta: ModelDecorationOptions.register({
@@ -242,32 +251,30 @@ class LinkDetector implements editorCommon.IEditorContribution {
private updateDecorations(links: Link[]): void {
const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey');
this.editor.changeDecorations((changeAccessor: IModelDecorationsChangeAccessor) => {
var oldDecorations: string[] = [];
let keys = Object.keys(this.currentOccurrences);
for (let i = 0, len = keys.length; i < len; i++) {
let decorationId = keys[i];
let occurance = this.currentOccurrences[decorationId];
oldDecorations.push(occurance.decorationId);
}
let oldDecorations: string[] = [];
let keys = Object.keys(this.currentOccurrences);
for (let i = 0, len = keys.length; i < len; i++) {
let decorationId = keys[i];
let occurance = this.currentOccurrences[decorationId];
oldDecorations.push(occurance.decorationId);
}
var newDecorations: IModelDeltaDecoration[] = [];
if (links) {
// Not sure why this is sometimes null
for (var i = 0; i < links.length; i++) {
newDecorations.push(LinkOccurrence.decoration(links[i], useMetaKey));
}
let newDecorations: IModelDeltaDecoration[] = [];
if (links) {
// Not sure why this is sometimes null
for (let i = 0; i < links.length; i++) {
newDecorations.push(LinkOccurrence.decoration(links[i], useMetaKey));
}
}
var decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations);
let decorations = this.editor.deltaDecorations(oldDecorations, newDecorations);
this.currentOccurrences = {};
this.activeLinkDecorationId = null;
for (let i = 0, len = decorations.length; i < len; i++) {
var occurance = new LinkOccurrence(links[i], decorations[i]);
this.currentOccurrences[occurance.decorationId] = occurance;
}
});
this.currentOccurrences = {};
this.activeLinkDecorationId = null;
for (let i = 0, len = decorations.length; i < len; i++) {
let occurance = new LinkOccurrence(links[i], decorations[i]);
this.currentOccurrences[occurance.decorationId] = occurance;
}
}
private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void {