Check out this RStudio behavior where if we send input to the console from an editor with Cmd + Enter, then that input is used when we are in a readline() prompt:
Admittedly I never do this in practice, and could see an argument for requiring an "input reply" to be actual user input physically typed into the console (meaning there would not be a bug here). If that's the case, I think we should add a test for this case to prove to our future selves that we have thought about this behavior.
We could argue that it's a good property for Cmd+A Cmd+Enter to be equivalent to repeatedly doing Cmd+Enter over the entire file. That would provide a justification for the current behaviour.
Check out this RStudio behavior where if we send input to the console from an editor with
Cmd + Enter
, then that input is used when we are in areadline()
prompt:https://github.com/user-attachments/assets/60578f31-c180-4c0f-95d4-0e538a953cab
Compare that with Positron, where instead the input is sent into a queue that only runs after the user manually types something into the Console
https://github.com/user-attachments/assets/f3f1c897-9e8a-43c7-9084-01381fbd6ff3
This briefly surprised me when creating this reprex. I had all the
aaaaa
s in the editor and sent them to the console with cmd+enter. https://github.com/posit-dev/ark/pull/536#discussion_r1773822974Admittedly I never do this in practice, and could see an argument for requiring an "input reply" to be actual user input physically typed into the console (meaning there would not be a bug here). If that's the case, I think we should add a test for this case to prove to our future selves that we have thought about this behavior.