Skip to content

"Focus console after executing from source" setting not working #18635

Closed

Description

@symbalex

System details

RStudio Edition : Desktop
RStudio Version : RStudio 2026.08.1+195 "Yellow Yarrow" Release (8d474bc4cfad0e317095cd171e8ef44db6887068, 2026-08-14) for Ubuntu Jammy
OS Version      :  Ubuntu 24.04.4
R Version       : 4.6.1

Steps to reproduce the problem

I have not been able to make a reproducible example that works on a different system.

Describe the problem in detail

When I execute code in RStudio with the Source Editor popped out, the cursor moves to the console automatically. However, Tools > Global Options > Code > Execution > "Focus console [...]" is not ticked.

I have tried (restarting each time):

  • Tools > Global Options > Code > Execution > toggling "Focus console [...]" ON, restarting R, toggling OFF
  • In ~/.config/rstudio/rstudio-prefs.json, adding "focus_console_after_exec": false to the JSON.

Running > .rs.readUiPref("focus_console_after_exec") gives FALSE

This does not occur when the Source Editor is docked.

Example (screen capture): https://drive.google.com/file/d/1su4EpqejRYjf8By2Em3g4UO930zJ8viN/view?usp=sharing

Describe the behavior you expected

The cursor should remain in the Source Editor.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions