Describe the bug
I have ReSharper and VsVim installed. When I use ReSharper to rename a variable VsVim is left in visual mode. I have to press escape several times to get it out of visual mode. Sometimes, I just have to hold the escape down for a couple of seconds to get VsVim out of visual mode.
To Reproduce
Steps to reproduce the behavior:
When I was just testing this, I hit escape 15 times and it was still in visual mode. After holding down the escape key for a while, VsVim exited visual mode.
Expected behavior
After renaming a variable, VsVim should not stay in visual mode.
Environment (please complete the following information):
I have SuperCharger installed and thought that it could be the problem because of some stuff it does but I disabled it and the problem still happens.
I have this problem too, but as a workaround, you can exit visual mode with the v
key instead when this happens.
I have this issue too. I started seeing it after upgrading Resharper from 2019.2 to 2019.3.
I would like anyone who is actually experiencing this problem to do an experiment for me, if possible.
The experiment is to try turning off "Rename and Snippet Tracking". Yes I know that is contrary to the description given for the setting!
Anyway, I want to know how it affects the behavior. Thanks, kind soul!
I just tested this.
Now the bad news.
On Mon, Jan 6, 2020 at 2:03 PM Rick Sladkey notifications@github.com
wrote:
I would like anyone who is actually experiencing this problem to do an
experiment for me, if possible.The experiment is to try turning off "Rename and Snippet Tracking". Yes I
know that is contrary to the description given for the setting![image: image]
https://user-images.githubusercontent.com/2680524/71848584-d92fab00-309d-11ea-86ab-1c05acba66de.pngAnyway, I want to know how it affects the behavior. Thanks, kind soul!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/VsVim/VsVim/issues/2746?email_source=notifications&email_token=AAF6KIZ5JGCZXF2NPSNAWULQ4OMAVA5CNFSM4JGTUS4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGYYJA#issuecomment-571313188,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAF6KI4FQXIKW26AT67AF5TQ4OMAVANCNFSM4JGTUS4A
.
@jnothstine Thanks for doing that test. I will keep thinking about it.
I just tried this out on 33c1fa4de80e23db2b9c41f3826cffa1b69bb60e (VS 16.4.4, ReSharper 2019.3.1). Same results as above, but I tried adding a breakpoint to this method that logs what the prev/next modes are:
I copied out the contents of the output window after what seemed like significant actions to see if anything interesting shows up. I put the full results here: https://gist.github.com/dagood/cd82ff615041df2db8efca7ee5b08d55. (Probably some noise in there from focusing/unfocusing the experimental instance, sorry, not familiar with this output.)
One thing that looks weird to me is the switch from Normal => VisualCharacter => ExternalEdit after the initial refactor command, showing up as adjacent lines of the output:
...OnSwitchedMode(object, Vim.SwitchModeEventArgs): prev $Normal, next $VisualCharacter
...OnSwitchedMode(object, Vim.SwitchModeEventArgs): prev $VisualCharacter, next $ExternalEdit
Naively, this seems like it'd explain why completing the external edit causes VsVim to go to visual mode, since it was the prev mode before the tracked edit.
I actually downgraded ReSharper in my experimental instance from 2019.3.1 => 2019.2.4 to try to get a log to diff against, but it still repros for me! The strange-looking mode switch also still shows up. It's possible I need some more thorough refresh--I was just hoping to get something quickly to see if I was completely misguided, but not sure how to do that now.
Hitting v is a good enough workaround for me for now, thanks for that. 🙂
I've also noticed this issue for a few years now. Is this still in the process of being fixed, or is it just not realistically possible to resolve it?
Most helpful comment
I have this problem too, but as a workaround, you can exit visual mode with the
v
key instead when this happens.