-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Semi-colons not respected when running single line commands in R #4317
Comments
Reported again in #5240. |
I happened to be in the vicinity of this today. A few things to note about what ark does: Consider
Given that we don't see semicolons, I'm not 100% sure what to do to fix this yet. But it's probably something like
Or maybe similarly we could check if the following sibling starts on the same line as the node ends on, which I think can only happen if there is a semicolon. That seems like it may work as a signal to keep expanding. |
I see. I wouldn't mind using the R parser for this though, the potential inconsistencies do not worry me here. So if the whole line at point parses completely with the R parser, we just return the line range. |
Waiting on https://github.com/posit-dev/ark/actions/runs/12239460144 - posit-dev/ark#642 - posit-dev/ark#638 ### Positron Release Notes #### New Features - N/A #### Bug Fixes - `Cmd/Ctrl + Enter` now works as expected with expressions separated by semi-colons on a single line. #4317 ### Positron QA Notes Cmd/Ctrl + Enter on that line (or an empty preceding line) should run the entire line: ```r 1; 2; 3 ``` A semi-colon following a multiline expression is also supported, so for instance this should also evaluate everything if you put your cursor on the `{` and hit Cmd + Enter ```r { 1 }; 2 ```
Verified Fixed
Test scenario(s)Tested with initial filing scenario. Link(s) to TestRail test cases run or created: |
Hi,
Running a line of code with
Cmd + Enter
does not work as expected (or as it does in RStudio) when using semi-colons to separate commands. I know this is probably not a recommend practice, but nevertheless it should probably work.Running this will create
x
only and jump down the editor to the next command on a new line, but does not createy
orz
. In RStudio all three objects would be created, and this is what happens if you run the code directly in the console.The text was updated successfully, but these errors were encountered: