Skip to content

Commit

Permalink
Can't initialize document sync - bug (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszgolebiowski and Tomasz Gołębiowski authored Sep 17, 2024
1 parent ee48044 commit 52b5a69
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Cody.VisualStudio/Services/DocumentsSyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ private IVsTextView GetTextView(IVsWindowFrame windowFrame)
IVsTextView ppView = pvar as IVsTextView;
if (ppView == null && pvar is IVsCodeWindow vsCodeWindow)
{
if(vsCodeWindow.GetPrimaryView(out ppView) != 0)
vsCodeWindow.GetSecondaryView(out ppView);
try
{
if (vsCodeWindow.GetPrimaryView(out ppView) != 0)
vsCodeWindow.GetSecondaryView(out ppView);
}
catch
{
return null;
}
}

return ppView;
Expand Down

0 comments on commit 52b5a69

Please sign in to comment.