Skip to content

Commit

Permalink
Avoid type assertion (microsoft#223128)
Browse files Browse the repository at this point in the history
Avoid cast

For microsoft#211878
  • Loading branch information
mjbvz authored Jul 22, 2024
1 parent e2cdddf commit 163fd2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vs/workbench/test/browser/workbenchTestServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,12 @@ export class TestTextFileEditor extends TextFileEditor {
}

setSelection(selection: Selection | undefined, reason: EditorPaneSelectionChangeReason): void {
this._options = selection ? { selection } as IEditorOptions : undefined;
if (selection) {
const options: ITextEditorOptions = { selection };
this._options = options;
} else {
this._options = undefined;
}

this._onDidChangeSelection.fire({ reason });
}
Expand Down

0 comments on commit 163fd2a

Please sign in to comment.