Bug 3567 - Search does not escape characters
Summary: Search does not escape characters
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-02-21 16:44 UTC by Skyler
Modified: 2012-02-22 04:32 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Skyler 2012-02-21 16:44:29 UTC
Description of Problem:
- Selecting text and using Command-E (to insert the selected text into the search buffer) has errors if the selected text contains special characters, such as a parentheses. When text is added to the search buffer, that text should be escaped. The same thing occurs with Command-F (Ctrl+F for Windows) as well.


Steps to reproduce the problem:
1. Copy this line of text (including this text inside parentheses) into the editor, then highlight the entire line.
2. Hit Command-F (or Ctrl+F on Windows) to see the "Find" dialogue open
3. Notice the text displays "Not found", and Command-G (goto next search result) is ineffective.


Actual Results:
- Search cannot continue as the '(' (or any other special character) cannot be found without being escaped with a backslash: '\('


Expected Results:
- The search buffer should escape the current text. This should probably happen with the replacement buffer as well, since an ampersand '&' in most grep or sed implementations means "entire contents of the search pattern" but selecting text with that ampersand and selecting it as the replacement text would be interpreted as "include the ampersand in the result, not the entire search string".


How often does this happen?
- Always
Comment 1 Mike Krüger 2012-02-22 04:32:50 UTC
fixed.