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

If any code is selected, script is run from beginning to cursor #4

Open
petrbouchal opened this issue Jan 23, 2021 · 2 comments
Open

Comments

@petrbouchal
Copy link

e.g. in script

library(dplyr)

print("hi")
mtcars %>%
  filter(gear > 3) %>% 
  filter()

with selection like

image

the whole script is run.

Not a dealbreaker, but surprising.

@MilesMcBain
Copy link
Owner

I can't reproduce this one.

So what happens is that the chain is run to the start of the selection. Which in this case is just mtcars.

I suppose it could make the split point at end of the selection, although I am not certain if that isn't potentially more confusing.

@petrbouchal
Copy link
Author

You're right, I misread the output - sorry!

I think what I expect to happen in this case is just for the selection to run, and I think setting the split point to the end of the selection might be closer to that. But also this is largely an accidental use case so if it is too much hassle to change the behaviour, the current one is probably fine.

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

No branches or pull requests

2 participants