1

Topic: Backspace in command mode alters text

If I start a search and replace command and use backspace to alter what I've typed the underlying text gets changed. This GIF https://1drv.ms/u/s!Aj7pYEj2vnD8hY91OzTmiGh7AFIAnA demonstrates the behavior.

Is this a known issue?

I'm using ViEmu 3.9.1 and version 16.2.0 of Visual Studio 2019, although I've noticed it for a few versions.

Ray

2

Re: Backspace in command mode alters text

Hi Ray,

Indeed, this has been happening occasionally for some time. It involves the text editor keeping focus instead of the tiny QuickFind window taking it, and ViEmu doesn't actually do anything, so I'm not sure exactly what is the cause. I have been using some kind of WinForms Spy tool to try to understand the cause, but haven't been able to so far. The worst problem is that I only see it reproducing very occasionally, if you find a reliable way to reproduce it, I would be very grateful if you can share it with me. I will keep trying to reproduce it and I hope to have a fix in a future version. My apologies for the long time it's taking to fix this annoying issue.

Regards,

  -- Jon

3

Re: Backspace in command mode alters text

I've been able to recreate the problem with ViEmu 3.10.0 and VS2019 16.4.2. I created a new ASP.NET Core MVC app, opened the controller, and tried a few ViEmu commands. Nothing happened when I started a search and then hit backspace. If I started a search/replace and hit backspace the text was changed. However, this only happened when the text I was searching for was on a different line from the cursor. You should be able to see the GIF I created here: https://1drv.ms/u/s!Aj7pYEj2vnD8hZospSm … w?e=OW38R1

I have Carnac running to display the keys I hit.

4

Re: Backspace in command mode alters text

Thanks for posting that video, now I understand it much better. It's a completely different issue from what I thought... it is a ViEmu search & replace (:s), not a VS native one. I see that you have Resharper installed, can you try deactivating it or uninstalling it? The issue is probably due to an interaction with that. I will look into it in any case, there is another Resharper interaction that needs addressing. Regards -- Jon

5

Re: Backspace in command mode alters text

You were correct. Disabling ReSharper eliminated the behavior. Ugh.

6

Re: Backspace in command mode alters text

Thanks for letting me know. I will try to find a work around for the next version of ViEmu. You might be able to find a workaround by fiddling with R# settings regarding to input, which affect how it treats backspace - I've done it in the past, but of course there is no surefire way to know what will fix things. I'm sorry for the annoyance, ViEmu is in a hard place here with the disorganized way VS allows extensions and add-ins to intercept input, there is no solid provision for order and/or structure.