Skip to content

Commit c976dba

Browse files
authored
Don't show warning notification when C_Cpp.getIncludes is disabled (#12470)
1 parent d5077a2 commit c976dba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export function registerCommands(enabled: boolean): void {
403403
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ExtractToFreeFunction', enabled ? () => onExtractToFunction(true, false) : onDisabledCommand));
404404
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ExtractToMemberFunction', enabled ? () => onExtractToFunction(false, true) : onDisabledCommand));
405405
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ExpandSelection', enabled ? (r: Range) => onExpandSelection(r) : onDisabledCommand));
406-
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.getIncludes', enabled ? (maxDepth: number) => getIncludes(maxDepth) : onDisabledCommand));
406+
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.getIncludes', enabled ? (maxDepth: number) => getIncludes(maxDepth) : () => Promise.resolve()));
407407
}
408408

409409
function onDisabledCommand() {

0 commit comments

Comments
 (0)