提交 9bcaa30f 编写于 作者: J Josh Varty 提交者: Kevin Ransom (msft)

Return when there is no parent IVsWindowFrame to inherity keybindings (#2813)

上级 4ddf1ff2
......@@ -56,6 +56,15 @@ public void InitKeyBindings(IVsTextView vsTextView)
sp.QueryService(typeof(SVsWindowFrame).GUID, typeof(IVsWindowFrame).GUID, out unkFrame);
//When calling Peek Definition, the editor creates an IVsTextView within another view.
//Therefore this new view won't exist as the direct child of an IVsWindowFrame and we will return.
//We don't need to worry about inheriting key bindings in this situation, because the
//parent IVsTextView will have already set this value during its creation.
if(unkFrame == IntPtr.Zero)
{
return;
}
var frame = Marshal.GetObjectForIUnknown(unkFrame) as IVsWindowFrame;
frame.SetGuidProperty((int)__VSFPROPID.VSFPROPID_InheritKeyBindings, VSConstants.GUID_TextEditorFactory);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册