Topic: Undo Jump


Whenever I undo using ViEmu, the cursor jumps to some previous line for some reason. Sometimes the jumps are huge. This makes it very hard to follow what is being 'undo'ed, so much so that I end up using Visual Studio's undo (which can sometimes require quite a few undos).

I am using Visual Studio 2008 and as far as I can tell this does not happen on Visual Studio 2010. Is this a known issue? Is there a workaround?

ViEmu version I am using: 3.0.6


Last edited by samaursa (2012-11-11 04:02:33)


Re: Undo Jump

I've also experienced some weird issues with the built in undo


Re: Undo Jump

Hi, I'll have a look at it, although if any of you have some reproduction steps, it would be very helpful. Many things change between the VS2010 and the "Classic" version of ViEmu, since the integration is completely different (the text editor component was rewritten from scratch using .NET in VS2010, previously, it was COM-based C++ native code). Undo/redo is one of those areas where the extensibility VS provides is not great, and the vim model is so different from VS's default one that a lot of work has to be done. This involves using heuristics, etc... which can cause weird behavior in some cases.

Again, any more details would be really helpful.


  -- Jon


Re: Undo Jump

I've been experiencing this behavior as well when writing C++ code in VS 2010 with ViEmu 3.0.13 and VisualAssistX 10.8.2043.0.  I suspect this might be an issue with VisualAssistX's enhanced navigation (http://www.wholetomato.com/features/fea … on.asp#nav).

eventualEntropy/samaursa: do you use VisualAssistX?  Has anybody experienced this issue WITHOUT VisualAssistX?

Unfortunately, I haven't been able to create a test plan that reproduces this issue.  It only seems to occur after I've edited a file for a long time (e.g. an hour).  The place it jumps back to seems to be a place I had navigated to with mouse clicks (but not places that I've edited, so should never be the new cursor location when undoing).


Re: Undo Jump

I just confirmed that with VisualAssistX disabled, I'm still getting the undo jumping behavior, so that was a red herring I guess.

If I recall properly, the undo jump bug only occurs when I have the same file open twice via the VS Window > New Window option.

Jon, can you advise whether it is likely that having the same file open in two VS windows is at all related to the undo jump behavior (and if so, then would split screen likely be related as well)?  Do you have any tips to avoid this bug?  At this point, just going to stop using the ViEmu undo/redo, and just try using VS CTR+Z / CTR+Y undo/redo.  I'm running into this bug multiple times a day, and it is disorienting. Sometimes I end up loosing some work because I end up not realizing what I've done until after entering some other command that makes it impossible to redo.