Skip to content

Commit eb1d4ae

Browse files
committed
Update.
1 parent 31139ab commit eb1d4ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,11 +1839,11 @@ export class DefaultClient implements Client {
18391839
await this.languageClient.sendNotification(DidChangeTextEditorVisibleRangesNotification, params);
18401840
}
18411841

1842-
public async onDidChangeTextDocument(textDocumentChangeEvent: vscode.TextDocumentChangeEvent): Promise<void> {
1843-
await this.ready;
1842+
public onDidChangeTextDocument(textDocumentChangeEvent: vscode.TextDocumentChangeEvent): void {
18441843
if (util.isCpp(textDocumentChangeEvent.document)) {
18451844
// If any file has changed, we need to abort the current rename operation
1846-
if (workspaceReferences.renamePending) {
1845+
if (workspaceReferences !== undefined // Occurs when a document changes before cpptools starts.
1846+
&& workspaceReferences.renamePending) {
18471847
workspaceReferences.cancelCurrentReferenceRequest(refs.CancellationSender.User);
18481848
}
18491849

Extension/src/LanguageServer/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ async function onDidChangeSettings(event: vscode.ConfigurationChangeEvent): Prom
298298
}
299299
}
300300

301-
async function onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent): Promise<void> {
301+
function onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent): void {
302302
const me: Client = clients.getClientFor(event.document.uri);
303303
me.onDidChangeTextDocument(event);
304304
}

0 commit comments

Comments
 (0)