Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,8 @@ export class DefaultClient implements Client {
public onDidChangeTextDocument(textDocumentChangeEvent: vscode.TextDocumentChangeEvent): void {
if (util.isCpp(textDocumentChangeEvent.document)) {
// If any file has changed, we need to abort the current rename operation
if (workspaceReferences.renamePending) {
if (workspaceReferences !== undefined // Occurs when a document changes before cpptools starts.
&& workspaceReferences.renamePending) {
workspaceReferences.cancelCurrentReferenceRequest(refs.CancellationSender.User);
}

Expand Down
2 changes: 1 addition & 1 deletion Extension/src/LanguageServer/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async function onDidChangeSettings(event: vscode.ConfigurationChangeEvent): Prom
}
}

async function onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent): Promise<void> {
function onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent): void {
const me: Client = clients.getClientFor(event.document.uri);
me.onDidChangeTextDocument(event);
}
Expand Down