Xcode playgrounds - please remember cursor position if it's inside of markup, when going to render mode

Originator:markd
Number:rdar://30329541 Date Originated:2/2/2017
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.3 beta (8W109m)
Classification:Enhancement Reproducible:Always
 
Summary:
I'm editing prose in playground markup.  I want to see what it looks like.  When I Show Rendered Markup, the insertion point is moved into (usually) regions not inside of any markup. 

When returning to Raw Markup, the insertion point doesn't get returned. If I have a fair amount of markup, the distance between where I'm editing and where the cursor gets moved can be non-trivial.

Xcode isn't consistent in scrolling / not-scrolling, so I can't depend on "ok, exit render mode and be generally where I was",

This makes the editing-exploring-verification workflow pretty non-optimal because I have to keep scrolling to re-acquire where I was.

Suggestion: when going into render mode (I have a shortcut key defined to make it quick), remember the cursor position. If there wasn't any cursor motion, return the cursor to that point when existing rendered mode.

Steps to Reproduce:
Edit playground markup (say line 10)
Show rendered markup (first rendered-playground editable line is line 5000)
return to raw markup without any intervening cursor movement

Expected Results:
Cursor is at line 10

Actual Results:
Cursor is at line 5000 (sometimes 5001)
Sometimes it's scrolled to line 10 (but no insertion point). Sometimes it's scrolled to line 5000



Version:
Version 8.3 beta (8W109m)
10.12.2 (16C67)


Notes:


Configuration:


Attachments:
'playground-render-cursor-movement.mp4' was successfully uploaded.

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!