File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ export function createProtocolFilter(): Middleware {
4545 // client.takeOwnership() will call client.TrackedDocuments.add() again, but that's ok. It's a Set.
4646 client . takeOwnership ( document ) ;
4747 void sendMessage ( document ) ;
48- const cppEditors : vscode . TextEditor [ ] = vscode . window . visibleTextEditors . filter ( e => util . isCpp ( e . document ) ) ;
49- client . onDidChangeVisibleTextEditors ( cppEditors ) . catch ( logAndReturn . undefined ) ;
48+ client . ready . then ( ( ) => {
49+ const cppEditors : vscode . TextEditor [ ] = vscode . window . visibleTextEditors . filter ( e => util . isCpp ( e . document ) ) ;
50+ client . onDidChangeVisibleTextEditors ( cppEditors ) . catch ( logAndReturn . undefined ) ;
51+ } ) . catch ( logAndReturn . undefined ) ;
5052 }
5153 }
5254 } ,
You can’t perform that action at this time.
0 commit comments