Xcode comment/uncomment after paste doesn't work

Originator:blocksom
Number:rdar://12505641 Date Originated:
Status: Resolved:
Product:Developer Tools Product Version:4.5.1
Classification:Enhancement Reproducible:Always
 
Summary:
When you move a commented out line in a file, you can uncomment it

Steps to Reproduce:
Open a .m or other file in Xcode that obeys C syntax
Comment out an indented line using ⌘/ (command-slash)
Note that the // appears at the beginning of the line (not indented)
Cut the line that you just commented out
Paste it somewhere else in the file
Note that the // appears indented
Try to remove the // from the line by pressing ⌘/ (command-slash)

Expected Results:
The comment should be removed

Actual Results:
An additional // is added at the beginning of the line. For example, if the line started out as:
    a = 5;
And you commented it out with ⌘-/ it would become:
// a = 5
And then you moved it elsewhere in the file it changes to:
    // a = 5
And then you try to uncomment it and it becomes:
//   // a = 5
Instead of going back to
    a = 5

Notes:
As an instructor this drives me batty! I'm often commenting in/out parts of code to demonstrate different things. It seems the root problem is a conflict with auto indent and the comment insertion.

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!