Xcode 10: Control-T behaves incorrectly at the end of a line

Originator:rsfinn
Number:rdar://50826693 Date Originated:2019-05-15
Status:Open Resolved:
Product:Developer Tools/Xcode Product Version:10.2.1
Classification:UI/Usability Reproducible:Always
 
Summary:
The text editor in Xcode 10 does not handle Control-T correctly, at least when it comes to the very important special case of Control-T at the end of the line.  In NSTextView fields, and in Emacs generally back to at least 1979 (when I first encountered it), Control-T at the end of the line exchanges the last two characters of the line; this is a special case, but much more useful than the alternative of exchanging the character at the end of the line with the newline, thereby moving the last character onto the following line.

Sadly, this is what the text editor in Xcode 10 does.  Not only is this behavior inconsistent and unexpected, but it has no inherent utility.

Steps to Reproduce:
In Xcode 10, open a new empty text file; type several characters (e.g. "12345"), then press control-T.

Expected Results:
The last two characters in the line (in other words, the two characters before the insertion point) are exchanged. (In the preceding example, the result would be "12354".)

Actual Results:
The last character in the line is moved to the start of the following line.

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!