Pasting should not invoke the new auto-matched delimiter behavior

Originator:kelan
Number:rdar://32694991 Date Originated:2017-06-10
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9.0 beta (9M136h)
Classification:UI/Usability Reproducible:Always
 
Summary:
The Xcode 9 release notes say:
> When text is selected, typing a opening delimiter adds a matching closing delimiter at the end of the selection. Auto-matched delimiters include " ", ( ), [ ], { }. (29164633)

That's a nice feature.  But, it also happens when pasting one of those opening delimiters, which I don't expect nor want.  Pasting should be literal, and always replace the selected text, no matter what the pasted content is.

Steps to Reproduce:
I often do editing operations for multiple find/replaces (but, where I want to be more manual than the "Find and Replace" tool in the editor):

1) Copy the replacement text to my pasteboard.  For this issue, let's say that is a single opening delimiter (e.g. `[`)

2) Select the text I want to replace, and press cmd-e

3) Quickly and repeatedly press cmd-g, then cmd-v to find the next occurrence, briefly visually inspect that it's what I want to replace, and then paste the replacement.

But, if the text I want to paste (copied in step 1) is an opening delimiter, then each paste in step 3 doesn't replace what I want, but instead it surrounds the selected text with those delimiters.

Expected Results:
I expect the selected text to always be replaced by what I am pasting, no matter what the content is that I am pasting.

Observed Results:
The selected text remains, and is surrounded by the delimiters.

Version:
Version 9.0 beta (9M136h)
macOS 10.12.5 (16F73)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!