Xcode ignores line wrap setting in Swift Playgrounds' Content.swift file but not source files

Number:rdar://31157349 Date Originated:20-Mar-2017
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:Always
Xcode ignores the Line Wrapping preference in Xcode Preferences to disable line wrapping ("Wrap lines to editor width").

Steps to Reproduce:
1. Disable Line Wrapping in Xcode Preferences -> Editor -> Indentation-> "Line Wrapping"
2. Open attached Swift Playground in Xcode
3. In the Contents.swift file ("LineWrapping" on the left), observe line wrapping.
4. In the LineWrap file ("LineWrap.swift" on the left in the "Sources" directory), observe the same file not line wrapping

Expected Results:
No line wrapping at all when Line Wrapping is disabled

Actual Results:
Xcode wraps the lines only in the Playground's Contents.swift file

8.2.1 (8C1002)


Happens on both iMac and Macbook on macOS 10.12.2 & 10.12.3.

'LineWrapping.playground.zip' was successfully uploaded.


Here is the full content of both the Playground file (Contents.swift) and the source file used (LineWrap.swift). Both had the exact same content, a really large string.


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!