mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user