Hi,
I am trying to achieve similar effect as "peak definition" window in VS 2015. I have a custom adornment created on IWpfTextView that can show another peace of code via IVsInvisibleEditor instance. It works great, except now Undo/Redo (and also Save) functions are not working.
For instance:
If I open csharp file "MyClass.cs" by dbl click, VS will open the default editor for the C#. If I change something, then Undo/Redo will be enabled (activated) and I will be able to use them. But, now I open my adornment which is hosted in the same IWpfTextView, I move programmatically focus to the inner IWpfTextView (the one which is hosted inside adornment), but Undo/Redo context won't be changed - it is still related to the parent's IWpfTextView. How can I tell VS that it should use IOleUndoManager of the inner IWpfTextView instead of parent's? Can I change context of Undo/Redo programmatically via some API?
Thanks,