Home Dashboard Directory Help
Search

F3 find & Find and Replace dialog by CodeVisio


Status: 

Closed


2
0
Sign in
to vote
Type: Bug
ID: 778452
Opened: 2/4/2013 3:35:47 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

My assumption is that there is a relationship between what happens in the VS IDE code editor and what are the values shown in the Find and Replace dialog.
For example:
a) if the caret is on a word in the code editor and you click Ctrl+F3 the Find and Replace dialog appears. The "Find what" edit box of the Find and Replace dialog will shown that word.
b) if you select a word in the code editor and click Ctrl+F3 the Find and Replace dialog appears. The "Find what" edit box of the Find and Replace dialog will shown that word.
c) if you select multiple lines in the code editor and click Ctrl+F3 then the "Look in" combo box will be set to "Selection" value.

Now, if you select multiple lines in the code editor and click Ctrl+F3 then the "Look in" combo box has been automatically set to "Selection". I believe VS assumes you want to find a word inside the selection.
My problem arises when I select, by mistake, multiple lines, click on Ctrl+F3, insert a word to look for into the "Find what" edit box of the Find and Replace dialog, click the Enter/Return key, and see that the word isn't inside the multiple lines selected. If at this point I click three times the ESC key to remove, in order, the VS message box, the Find and Replace dialog, and at the end the selection inside my code editor, and click the F3 key to continue the search in my document (because I know there are instances of the word I'm looking for inside my document), VS didn't perform well the search, saying that there are no more instances of that word.


- VS versions affected.
VS2008/VS2010 professionals edition.
VS2012 express edition. VS2012 doesn't even perform the 7) point of my Steps to reproduce, but will show directly the message box from the 8) point.

Let me know if it is unclear.

Thank you
Details
Sign in to post a comment.
Posted by CodeVisio on 2/25/2013 at 1:52 PM
Thanks for you answer and for your work.
Posted by Microsoft on 2/25/2013 at 7:19 AM
Hello,

Thank you for logging this issue. The root cause is that in Step6, Find control still thinks that the scope is "Selection". This is because the find control was dismissed before the selection in the Editor was cleared - thus it didn't have a chance to clear the scope. When you hit F3 in Step6, it is searching in the selection and thus you get the not found message. As a work around, please bring up the Find control and change the scope back to Current Document before hitting F3. Alternatively, you can use the keyboard shortcut Ctrl+I and type the new search term.

We know this is inconvinient and can be an annoyance. We will continue to improve the Find experience in Visual Studio for future versions. I am marking this bug as copied to our backlog.

Thanks,
Murali
Murali Krishna Hosabettu Kamalesha | Program Manager | Visual Studio Professional - Editor team
Posted by Microsoft on 2/6/2013 at 2:27 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 2/4/2013 at 3:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.