Duplicate 'new' with multiple carets and "new Thing" intellisense option

Steps:

Declare a class (problem seems not to occur with `object`):

class Thing { }

Declare two auto properties in some other type:

public Thing A { get; }|
public Thing B { get; }|

Use multi-caret as above to assign to both properties simultaneously:

public Thing A { get; } = new |
public Thing B { get; } = new |

It seems to be required to at least type a space after the new keyword.

At this point, choose from Intellisense the “new Thing()” option (and not the “Thing()” option)

Result should be that the “new” text is duplicated on the second line:

public Thing A { get; } = new Thing|
public Thing B { get; } = new Thing|new

Thanks

0
7 comments

Hi Dave! 

Thank you for the detailed description. Could you please add a screencast illustrating the issue? I can't reproduce this one also. 

I appreciate your patience! 

0

Hi Dave! 
Thank you for the screencast. I reproduced the issue in Rider 2023.2.2. However, it seems like everything works fine in the new Rider EAP. Would you mind installing it to check? 

Thanks! 

0

Testing it again, this is still an issue, currently using 2024.2.5.

0

Hi Dave! 

Sorry, still cannot reproduce it on my side. Could you please give me some more details? 

What OS are you using? How exactly do you clone the caret? 

Thanks! 

0

Windows 10/11 Pro

Clone caret using Shift+Alt+DownArrow

Testing it out more right now… I did it a bunch of times in a row and then suddenly it stopped happening and now I can't get it to happen… I'll let you know if I figure anything else out…

0

Hi Dave! 

Thank you for the details. 

Please let me know if it happens again. I'll do my best to reproduce it in our environment. 

0

Please sign in to leave a comment.