Skip to content

Commit b849725

Browse files
committed
Avoid shitfting editor focus when using test code lens
1 parent a8050f0 commit b849725

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

vscode/src/streamingRunner.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,13 @@ export class StreamingRunner implements vscode.Disposable {
250250

251251
if (!this.run) {
252252
this.run = this.createTestRun(
253-
new vscode.TestRunRequest(),
253+
new vscode.TestRunRequest(
254+
undefined,
255+
undefined,
256+
undefined,
257+
undefined,
258+
true,
259+
),
254260
"on_demand_run_in_terminal",
255261
);
256262
}

vscode/src/testController.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,7 @@ export class TestController {
386386
const testItem = await this.findTestItem(name, uri);
387387
if (!testItem) return;
388388

389-
await vscode.commands.executeCommand(
390-
"vscode.revealTestInExplorer",
391-
testItem,
392-
);
393389
const tokenSource = new vscode.CancellationTokenSource();
394-
395390
tokenSource.token.onCancellationRequested(async () => {
396391
tokenSource.dispose();
397392
await vscode.window.showInformationMessage("Cancelled the progress");

0 commit comments

Comments
 (0)