Skip to content

Commit b2b2425

Browse files
bors[bot]matklad
andauthored
Merge #9827
9827: internal: remove client-side support for latest requests r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents dd68d18 + bb86074 commit b2b2425

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

editors/code/src/commands.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,20 @@ export function analyzerStatus(ctx: Ctx): Cmd {
3535
}
3636
}();
3737

38-
let poller: NodeJS.Timer | undefined = undefined;
39-
4038
ctx.pushCleanup(
4139
vscode.workspace.registerTextDocumentContentProvider(
4240
'rust-analyzer-status',
4341
tdcp,
4442
),
4543
);
4644

47-
ctx.pushCleanup({
48-
dispose() {
49-
if (poller !== undefined) {
50-
clearInterval(poller);
51-
}
52-
},
53-
});
54-
5545
return async () => {
56-
if (poller === undefined) {
57-
poller = setInterval(() => tdcp.eventEmitter.fire(tdcp.uri), 1000);
58-
}
5946
const document = await vscode.workspace.openTextDocument(tdcp.uri);
60-
return vscode.window.showTextDocument(document, vscode.ViewColumn.Two, true);
47+
tdcp.eventEmitter.fire(tdcp.uri);
48+
void await vscode.window.showTextDocument(document, {
49+
viewColumn: vscode.ViewColumn.Two,
50+
preserveFocus: true
51+
});
6152
};
6253
}
6354

0 commit comments

Comments
 (0)