Skip to content
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

Execute Current Code Block Without Selection #5448

Closed
cordeiroitamar opened this issue Nov 21, 2024 · 2 comments
Closed

Execute Current Code Block Without Selection #5448

cordeiroitamar opened this issue Nov 21, 2024 · 2 comments
Labels
info needed Waiting on information

Comments

@cordeiroitamar
Copy link

Hello,

I noticed a difference in behavior between Positron and RStudio regarding code execution in an "R File", which has impacted my workflow.

In RStudio, if I place the cursor anywhere within a code block (even at the end of a line with a pipe operator |>), I can execute the entire block by pressing Ctrl + Enter, without needing to manually select all the lines.

In Positron, however, when working in an "R File", if I place the cursor at the end of a line with a pipe operator and press Ctrl + Enter, I get an error

To make it work in Positron, I must manually select the entire block before pressing Ctrl + Enter.

Would it be possible to implement a behavior similar to RStudio's, where the entire block of code is executed automatically based on the cursor's position in an "R File"?

@juliasilge
Copy link
Contributor

Can you share some example R code where you are not seeing a statement being detected as you expect? We do expect Cmd/Ctrl+Enter to detect the current statement in an .R file and then send it to a console, so if you are observing a problem, it would be great to have some details. Thanks!

@juliasilge juliasilge added the info needed Waiting on information label Nov 21, 2024
@cordeiroitamar
Copy link
Author

Ok! Everything is working perfectly. I had to close and reopen Positron to create an example, and everything worked fine.
It must have been some bug from having Positron open for several days (including closing and reopening the laptop).
Sorry about that.
Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed Waiting on information
Projects
None yet
Development

No branches or pull requests

2 participants