mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-19 22:59:48 +01:00
Tweak ctor of SelectionRange, https://github.com/Microsoft/language-server-protocol/issues/613
This commit is contained in:
Vendored
+1
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
];
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user