Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

UndoManager with multiple documents in a single view (similar to peak definition window)

$
0
0

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,


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>