I just upgraded RStudio to 2024.09.0 Build 375. I was typing some text outside of a chunk, i.e. words in the document, and inadvertently hit shift+enter. R tried to run the line.
To confirm the behavior, I restarted R, created a new markdown document with no chunks, typed:
library(tidyverse)
Hit shift+enter and R loaded the tidyverse package.
Note, it doesn't try to run the lines when I restart R and tell it to run all chunks or use the source command. So it apparently knows they are not in a chunk.
does the shortcut Shift + Enter show up in Tools > Modify Keyboard Shortcuts... It doesn't for me, and Shift +Enter just makes a break.
It does. It's Name is "Execute Current Line" and it's Scope is R.