Skip to content

Commit

Permalink
fixup! Don't compute the information for the code definition window i…
Browse files Browse the repository at this point in the history
…f not open

Code review feedback
  • Loading branch information
jasonmalinowski committed Oct 21, 2021
1 parent 8408670 commit f7625d0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private async Task<IVsCodeDefView> GetVsCodeDefViewAsync()
return _lazyCodeDefView;
}

_lazyCodeDefView = await _asyncServiceProvider.GetServiceAsync<SVsCodeDefView, IVsCodeDefView>().ConfigureAwait(false);
_lazyCodeDefView = await _asyncServiceProvider.GetServiceAsync<SVsCodeDefView, IVsCodeDefView>().ConfigureAwait(true);

return _lazyCodeDefView;
}
Expand All @@ -67,7 +67,7 @@ public async Task SetContextAsync(ImmutableArray<CodeDefinitionWindowLocation> l
return;
}

var vsCodeDefView = await _asyncServiceProvider.GetServiceAsync<SVsCodeDefView, IVsCodeDefView>().ConfigureAwait(false);
var vsCodeDefView = await GetVsCodeDefViewAsync().ConfigureAwait(true);

// Switch to the UI thread before using the IVsCodeDefView service
await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Expand Down

0 comments on commit f7625d0

Please sign in to comment.