Skip to content

Commit 03fc256

Browse files
authored
Fix unintentional module import. (#1484)
Fixes PowerShell/vscode-powershell#715 by not getting command documentation unless the module has already been imported.
1 parent 446fa59 commit 03fc256

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ public async Task<CompletionItem> Handle(CompletionItem request, CancellationTok
117117
return request;
118118
}
119119

120+
// No details means the module hasn't been imported yet and Intellisense shouldn't import the module to get this info.
121+
if (request.Detail is null)
122+
{
123+
return request;
124+
}
125+
120126
try
121127
{
122128
await _completionResolveLock.WaitAsync(cancellationToken).ConfigureAwait(false);

0 commit comments

Comments
 (0)