File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -35,29 +35,20 @@ export function analyzerStatus(ctx: Ctx): Cmd {
35
35
}
36
36
} ( ) ;
37
37
38
- let poller : NodeJS . Timer | undefined = undefined ;
39
-
40
38
ctx . pushCleanup (
41
39
vscode . workspace . registerTextDocumentContentProvider (
42
40
'rust-analyzer-status' ,
43
41
tdcp ,
44
42
) ,
45
43
) ;
46
44
47
- ctx . pushCleanup ( {
48
- dispose ( ) {
49
- if ( poller !== undefined ) {
50
- clearInterval ( poller ) ;
51
- }
52
- } ,
53
- } ) ;
54
-
55
45
return async ( ) => {
56
- if ( poller === undefined ) {
57
- poller = setInterval ( ( ) => tdcp . eventEmitter . fire ( tdcp . uri ) , 1000 ) ;
58
- }
59
46
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
+ } ) ;
61
52
} ;
62
53
}
63
54
You can’t perform that action at this time.
0 commit comments