Skip to content

Commit

Permalink
Fix unintentional module import. (#1484)
Browse files Browse the repository at this point in the history
Fixes PowerShell/vscode-powershell#715 by not getting command
documentation unless the module has already been imported.
  • Loading branch information
MartinGC94 authored May 24, 2021
1 parent 446fa59 commit 03fc256
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ public async Task<CompletionItem> Handle(CompletionItem request, CancellationTok
return request;
}

// No details means the module hasn't been imported yet and Intellisense shouldn't import the module to get this info.
if (request.Detail is null)
{
return request;
}

try
{
await _completionResolveLock.WaitAsync(cancellationToken).ConfigureAwait(false);
Expand Down

0 comments on commit 03fc256

Please sign in to comment.