1

Topic: Update to Resharper 2019.1.1 Consumes ESC

Still trying to figure out all conditions where this occurs, but after the latest update to ReSharper, the ESC key is being consumed before VIEmu gets to see it.  When trying to go from Insert mode to Normal mode, I am, in some cases, having to hit ESC two to three additional times to return to Normal mode.  It seems to be situations where ReSharper has offered autocompletion options.  Not quite sure what the difference is where it needs two ESC vs three.  I temporarily suspended ReSharper and ViEmu goes back to expected behavior.  That and it started after the latest update applied, so pretty sure it's a change to ReSharper.  I'm going to send them a note too, but figure they'll point me back here.

VS2017 Enterprise 15.9.11
ReSharper 2019.1.1 latest release version
ViEmu 3.9.1

2

Re: Update to Resharper 2019.1.1 Consumes ESC

I tried to downgrade to ReSharper 2019.1, but it did not resolve issue.  Based on 2019.1 -> 2019.1.1 release dates being so close, I might have updated from 2018.3.4, so might be a change in the 2019 version rather than .1 -> .1.1

3

Re: Update to Resharper 2019.1.1 Consumes ESC

Hello David, I plan to review compatibility with 3rd party add-ins in the coming weeks, hopefully I will be able to provide a new ViEmu version soon addressing this. Thanks for your patience -- Jon

4

Re: Update to Resharper 2019.1.1 Consumes ESC

Thanks!

5

Re: Update to Resharper 2019.1.1 Consumes ESC

After a ton of hours debugging and logging and trying to fully understand VS input processing in the presence of R# (impossible task, I would say, but I did get closer....), I have an idea that may help solving this.

Some background: ViEmu never gets access to the KeyDown event for the ESC key, mind you, only the ECMD_CANCEL / Edit.SelectionCancel command, which is the result of ESC KeyDown in stock VS, but when R# autocompletion is there, ViEmu doesn't even get to see that, that's why insert mode is not exited. ViEmu used to still get the QueryStatus call for that command, which allowed me to fix that in older versions of VS+R# combination, simulating ESC just on the Query for the command (which comes before executing it). But now, for some reason, I got no QueryStatus for ECMD_CANCEL at all any more when R# autocompletion is there.

So, my current possibly working idea for a fix would involve using the KeyUp event for the ESC key, which ViEmu does get! And exiting insert mode (or maybe doing whatever ESC is supposed to do). It seems a bit weird and potentially troublesome, but it may work,, and I'm thinking about having this active in some sort of setting. Best would be to have it always active and making sure it never causes trouble, but I will have to verify that throughly before changing the behavior of ViEmu when R# is not present.

I will post here again as soon as I have a new idea or a new version ready.

Thanks for your patience!

  -- Jon

6

Re: Update to Resharper 2019.1.1 Consumes ESC

Please, fix this as soon as you possibly can!! This is driving me up the wall!! I'm already developing the habit of hitting esc three times but that's not always enough. I just got used to have Resharper active before we upgraded to vs2019 and now I seem to have to choose between viemu or resharper. (No choice really, resharper will have to go if this can't be resolved, but I really don't want to have to do that now).

7

Re: Update to Resharper 2019.1.1 Consumes ESC

Jon,

Any ETA on an update to correct this?