You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to https://developer.apple.com/swift/blog/?id=18, pressing the enter key while editing code in the repl should insert a newline instead of executing the entered code (unless your cursor is at the very end of the function). On the current version of the repl, this is not the case.
To reproduce:
Type a function which takes up multiple lines into the repl
Evaluate the function
Press the up arrow key to go into history, and attempt to add a line in the middle of the function
Expected result: A new line is added in the middle of the function
Actual result: The repl evaluates the function
As it is currently, I can't figure out a way to add lines to functions in the history, any attempt I make to do so results in the function being evaluated instead.
The text was updated successfully, but these errors were encountered:
I agree with this, we need some way to insert a line into multi-line entry text. It's equally annoying that you can't add a line above you in the function you are currently entering.
We should only do this in multi-line mode, since otherwise when you went to fix a single typo on an line you would always have to ^E then return to submit it. Or really, to hit the return, curse a bit, delete the return, go to the end of the line and hit return...
I don't know how easy this will be to actually implement. We're already fighting a bit down and dirty to get editline to do what we already support. But it's definitely worth trying to fix this.
Additional Detail from JIRA
md5: 2274cc32671513101f68a18ba5519722
Issue Description:
According to https://developer.apple.com/swift/blog/?id=18, pressing the enter key while editing code in the repl should insert a newline instead of executing the entered code (unless your cursor is at the very end of the function). On the current version of the repl, this is not the case.
To reproduce:
Type a function which takes up multiple lines into the repl
Evaluate the function
Press the up arrow key to go into history, and attempt to add a line in the middle of the function
Expected result: A new line is added in the middle of the function
Actual result: The repl evaluates the function
As it is currently, I can't figure out a way to add lines to functions in the history, any attempt I make to do so results in the function being evaluated instead.
The text was updated successfully, but these errors were encountered: