type converters, use namespace for Selection

This commit is contained in:
Johannes Rieken
2018-05-04 18:17:34 +02:00
parent 6b4f88991b
commit 069bbd81e4
4 changed files with 20 additions and 18 deletions

View File

@@ -123,7 +123,7 @@ export class ExtHostEditors implements ExtHostEditorsShape {
textEditor._acceptOptions(data.options);
}
if (data.selections) {
const selections = data.selections.selections.map(TypeConverters.toSelection);
const selections = data.selections.selections.map(TypeConverters.Selection.to);
textEditor._acceptSelections(selections);
}
if (data.visibleRanges) {
@@ -140,7 +140,7 @@ export class ExtHostEditors implements ExtHostEditorsShape {
}
if (data.selections) {
const kind = TextEditorSelectionChangeKind.fromValue(data.selections.source);
const selections = data.selections.selections.map(TypeConverters.toSelection);
const selections = data.selections.selections.map(TypeConverters.Selection.to);
this._onDidChangeTextEditorSelection.fire({
textEditor,
selections,