Repository navigation
Ctrl+Alt+Home now echoes R code. How can I restore the previous behavior? #16702
|
After updating Positron on Windows, I noticed that Previously, this shortcut ran the code without echoing the script’s contents, leaving the console focused on the output. The change makes longer scripts much noisier to run. Was this an intentional change, or could it be a regression? Is there a setting or keybinding argument that restores the previous behavior while keeping results, messages, warnings, and errors visible? System information Positron Version: 2026.10.0 (user setup) build 297 |
Replies: 1 comment 4 replies
|
Short answer: I couldn't find a setting or command argument that hides the code, and as far as I can tell from the source, this command has always echoed it. Ctrl+Alt+Home runs
Workaround: source up to the cursor from a keybindingPositron's R kernel supports Requires [
{
"key": "ctrl+alt+home",
"command": "workbench.action.executeCode.console",
"when": "editorTextFocus && editorLangId == r",
"args": {
"langId": "r",
"code": "local({ctx <- rstudioapi::getSourceEditorContext(); n <- ctx$selection[[1]]$range$start[['row']]; source(exprs = parse(text = ctx$contents[seq_len(n)]), local = globalenv(), print.eval = TRUE)})"
}
}
]Add a copy with Caveats:
If you want this as a built-in option, a feature request issue for an "echo" toggle on the run-to-cursor commands would be the way to ask the team. Tested with: source review only. I read the source at |

This interleaving is a side effect of the console's completeness check (which is relatively new behavior). Try turning off Console: Prompt when Incomplete:
Does that make it behave as you expect?