Focus preferences not working

Rstudio is losing the focus from my script, no matter what I select in "Global Option"

Then, I tried to fix the problem editing ~/.config/rstudio/rstudio-prefs.jsonand found something weird.

If I select "Focus console after executing form source" in "Global Options", automatically a new line appears in rstudio-prefs.json that says:

"focus_console_after_exec": true,

But if I uncheck "Focus console after executing form source", that line dissappears.

I tried using the logical option "focus_console_after_exec": false,, but it didn't work, and. But it is more frustrating that when I restart RStudio, that line dissapears.

Finally, I lose the focus every time I run a line from my script.

Just in case, the content of my rstudio-prefs.json is the following:

I use rstudio in Ubuntu 24.04

{
    "jobs_tab_visibility": "shown",
    "initial_working_directory": "~",
    "pdf_previewer": "none",
    "posix_terminal_shell": "bash",
    "editor_theme": "Pebble-safe_MPS",
    "auto_detect_indentation": true,
    "insert_native_pipe_operator": true,
    "highlight_r_function_calls": true,
    "indent_guides": "rainbowfills",
    "default_project_location": "~/Laboratorio/BAFF-R/experimentos/Melina",
    "panes": {
        "quadrants": [
            "Source",
            "Console",
            "TabSet1",
            "TabSet2"
        ],
        "tabSet1": [
            "Environment",
            "History",
            "Connections",
            "Build",
            "VCS",
            "Tutorial",
            "Presentation"
        ],
        "tabSet2": [
            "Files",
            "Plots",
            "Packages",
            "Help",
            "Viewer",
            "Presentations"
        ],
        "hiddenTabSet": [],
        "console_left_on_top": false,
        "console_right_on_top": true,
        "additional_source_columns": 0,
        "sidebar": [
            "Chat"
        ],
        "sidebar_visible": false,
        "sidebar_location": "right"
    },
    "continue_comments_on_newline": true,
    "soft_wrap_r_files": true,
    "show_panel_focus_rectangle": true,
    "focus_console_after_exec": false,
    "source_with_echo": true,
    "execution_behavior": "paragraph"
}
1 Like

I forget to say that this problem is only when the code windows is detached in a separate window, not when the code window is part of the four panels in the principal window.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.