Resharper Intellisense autocompletion replace variables after caret (in VisualStudio)


I am using Resharper 2024.3.7 with Visual Studio 2022 Version 17.14.0.
I am calling a constructor (same behaviour for functions) like
var _test = new SearchParameters(SearchMode.Simple, 0.3f);
I want to use Resharper Intellisense autocompletion to add a parameter in the construction call after .Simple. I just place the cursor after the .Simple, and use Intellisense autocompletion. No matters if I click on Space or Enter, the Intellisense will add the new parameter but replace 0.3f.
However, only if I place another comma before 0.3f and place the curson in between the two comma,
var _test = new ColorModelCorrespondences.SearchParameters(SearchMode.Simple, , 0.3f);
then Intellisense will not replace existing parameters.
I am in doubt if this is the correct behavior, because my “Completing Characters” settings say that Enter or Tab should just insert, not replace. It can generate bug, if I do not see that the 0.3f is removed and there is a default parameter for that value.
Please sign in to leave a comment.
Hello Filippo Bandini, thank you for your report! Unfortunately, I wasn't able to reproduce the issue. Could you please provide detailed steps to reproduce? I tried the following:
- put cursor after ".Simple";
- “Ctrl+Space” to open completion. I also tried to put “.” after “.Simple” and complete “Equals” statement. But it wasn't helpful.
You can also upload a screencast illustrating the issue to the JB server and share the Upload ID with us to help us reproduce this behavior. Thank you!
It seems we have flaky behaviors.
So if you look at the code snippet
In the first case (the
Paramsfunction outside the Test method) I always overwrite the 0.3f when trying to add a parameter after ViewDirection. The only way to make it work is to put an additional comma after ViewDirection.In the second case (the
ColorModelCorrespondences.SearchParameters2 params2 =), it seems to work fine, no overwrite of 0.3f when adding the the interpolation method.Not sure why the two behaves differently, but to me it is the second the expected behavior.
I atttach a video when the behaviour with ID 2025_06_09_HNWbPApHVqQLXr7auHSBod
Filippo Bandini, thank you so much for the additional information! I've submitted a new issue to our bug tracker: RSRP-501024 Autocomplete incorrectly replaces existing parameter after the cursor. Please comment or vote for it to get notifications about status changes. Thank you!
Thanks for understanding the issue and creating a very precise bug ticket.