Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -237,9 +237,9 @@ export default class CommandHandler implements vscode.Disposable {
return null;
}
for (let i = 0; i < conflicts.length; i++) {
if (conflicts[i].range.contains(editor.selection.active)) {
return conflicts[i];
for (const conflict of conflicts) {
if (conflict.range.contains(editor.selection.active)) {
return conflict;
}
}
@@ -282,11 +282,11 @@ export default class CommandHandler implements vscode.Disposable {
throw new Error(`Unsupported direction ${direction}`);
}
for (let i = 0; i < conflicts.length; i++) {
if (predicate(conflicts[i]) && !conflicts[i].range.contains(selection)) {
for (const conflict of conflicts) {
if (predicate(conflict) && !conflict.range.contains(selection)) {
return {
canNavigate: true,
conflict: conflicts[i]
conflict: conflict
};
}
}

View File

@@ -35,7 +35,7 @@ export class Delayer<T> {
}).then(() => {
this.completionPromise = null;
this.onSuccess = null;
var result = this.task!();
let result = this.task!();
this.task = null;
return result;
});

View File

@@ -91,8 +91,7 @@ export default class DocumentMergeConflictTracker implements vscode.Disposable,
return false;
}
var task = this.cache.get(key);
const task = this.cache.get(key);
if (!task) {
return false;
}
@@ -128,7 +127,7 @@ export default class DocumentMergeConflictTracker implements vscode.Disposable,
}
private getCacheKey(document: vscode.TextDocument): string | null {
if (document.uri && document.uri) {
if (document.uri) {
return document.uri.toString();
}

View File

@@ -153,10 +153,10 @@ export default class MergeDecorator implements vscode.Disposable {
}
private applyDecorationsFromEvent(eventDocument: vscode.TextDocument) {
for (var i = 0; i < vscode.window.visibleTextEditors.length; i++) {
if (vscode.window.visibleTextEditors[i].document === eventDocument) {
for (const editor of vscode.window.visibleTextEditors) {
if (editor.document === eventDocument) {
// Attempt to apply
this.applyDecorations(vscode.window.visibleTextEditors[i]);
this.applyDecorations(editor);
}
}
}