Skip to content

Commit 2d1f896

Browse files
committed
added debug output to CodePane.ForceFocus. ref. #2331
1 parent f536d4d commit 2d1f896

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Rubberduck.VBEEditor/SafeComWrappers/VBA/CodePane.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private Selection GetSelection()
8888
return new QualifiedSelection(moduleName, selection);
8989
}
9090

91-
public void SetSelection(int startLine, int startColumn, int endLine, int endColumn)
91+
private void SetSelection(int startLine, int startColumn, int endLine, int endColumn)
9292
{
9393
Target.SetSelection(startLine, startColumn, endLine, endColumn);
9494
ForceFocus();
@@ -110,6 +110,10 @@ private void ForceFocus()
110110
{
111111
NativeMethods.ActivateWindow(handle, mainWindowHandle);
112112
}
113+
else
114+
{
115+
System.Diagnostics.Debug.WriteLine("CodePane.ForceFocus() failed to get a handle on the MainWindow.");
116+
}
113117
}
114118

115119
public void Show()

0 commit comments

Comments
 (0)