This commit is contained in:
Johannes Rieken
2018-12-27 10:07:23 +01:00
parent 577f744a3e
commit 96d2413a4e
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ declare module 'vscode' {
export class SelectionRange {
kind: SelectionRangeKind;
range: Range;
constructor(kind: SelectionRangeKind, range: Range);
constructor(range: Range, kind: SelectionRangeKind);
}
export interface SelectionRangeProvider {
@@ -855,7 +855,7 @@ export namespace SelectionRange {
}
export function to(obj: modes.SelectionRange): vscode.SelectionRange {
return new types.SelectionRange(SelectionRangeKind.to(obj.kind), Range.to(obj.range));
return new types.SelectionRange(Range.to(obj.range), SelectionRangeKind.to(obj.kind));
}
}
+2 -2
View File
@@ -1060,9 +1060,9 @@ export class SelectionRange {
kind: SelectionRangeKind;
range: Range;
constructor(kind: SelectionRangeKind, range: Range) {
this.kind = kind;
constructor(range: Range, kind: SelectionRangeKind, ) {
this.range = range;
this.kind = kind;
}
}
@@ -802,8 +802,8 @@ suite('ExtHostLanguageFeatureCommands', function () {
disposables.push(extHost.registerSelectionRangeProvider(nullExtensionDescription, defaultSelector, <vscode.SelectionRangeProvider>{
provideSelectionRanges() {
return [
new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 10, 0, 18)),
new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 2, 0, 20))
new types.SelectionRange(new types.Range(0, 10, 0, 18), types.SelectionRangeKind.Empty),
new types.SelectionRange(new types.Range(0, 2, 0, 20), types.SelectionRangeKind.Empty)
];
}
}));
@@ -1230,8 +1230,8 @@ suite('ExtHostLanguageFeatures', function () {
disposables.push(extHost.registerSelectionRangeProvider(defaultExtension, defaultSelector, <vscode.SelectionRangeProvider>{
provideSelectionRanges() {
return [
new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 10, 0, 18)),
new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 2, 0, 20))
new types.SelectionRange(new types.Range(0, 10, 0, 18), types.SelectionRangeKind.Empty),
new types.SelectionRange(new types.Range(0, 2, 0, 20), types.SelectionRangeKind.Empty)
];
}
}));