File tree 2 files changed +3
-2
lines changed
Extension/src/LanguageServer
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1842,7 +1842,8 @@ export class DefaultClient implements Client {
1842
1842
public onDidChangeTextDocument ( textDocumentChangeEvent : vscode . TextDocumentChangeEvent ) : void {
1843
1843
if ( util . isCpp ( textDocumentChangeEvent . document ) ) {
1844
1844
// If any file has changed, we need to abort the current rename operation
1845
- if ( workspaceReferences . renamePending ) {
1845
+ if ( workspaceReferences !== undefined // Occurs when a document changes before cpptools starts.
1846
+ && workspaceReferences . renamePending ) {
1846
1847
workspaceReferences . cancelCurrentReferenceRequest ( refs . CancellationSender . User ) ;
1847
1848
}
1848
1849
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ async function onDidChangeSettings(event: vscode.ConfigurationChangeEvent): Prom
298
298
}
299
299
}
300
300
301
- async function onDidChangeTextDocument ( event : vscode . TextDocumentChangeEvent ) : Promise < void > {
301
+ function onDidChangeTextDocument ( event : vscode . TextDocumentChangeEvent ) : void {
302
302
const me : Client = clients . getClientFor ( event . document . uri ) ;
303
303
me . onDidChangeTextDocument ( event ) ;
304
304
}
You can’t perform that action at this time.
0 commit comments