How to disable (or fix) automatic "End Class" -> "End Structure" replacement?

a b 1 Reputation point
2022-10-04T13:47:37.633+00:00

In Visual Studio 2019, using Visual Basic, when I have

Public Structure Foo  
End Structure  

and replace the "Structure" with "Class", Visual Studio tries to be helpful and replace the matching other "Structure" with "Class" too. When it works, it's fine, but this works at most once when replacing multiple instances:

Public Structure Foo 'Line 1  
    Public Structure Bar  
        Public Structure Baz  
        End Structure  
        Public Structure Blarg  
        End Structure  
        Public Structure Bloop  
        End Structure  
    End Structure  
End Structure  

When I replace "Structure" in line 3 with "Class", sometimes Visual Studio replaces the matching one in line 4 too, and sometimes it doesn't and I have to manually fix it. That alone wouldn't be a big deal, but from there on it completely breaks:
When I go on and replace "Structure" in line 5, the matching one in line 6 is never replaced!
And it gets worse! When I then manually replace the one in line 6, Visual Studio automatically replaces the not-so-matching one in line 2, causing everything to break!

How do I disable this infuriating behavior without disabling other important functionality?

PS:
I would also like to use this opportunity to scold whoever thought it was a good idea to change the Intellisense behavior from what it was in Visual Studio 2010. It was already perfect, then you broke it in newer versions.

Developer technologies | VB
Developer technologies | Visual Studio | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.