Skip to content

Source editor randomly becomes inoperable (dysfunctional text select, multi-line editing, & inputs appear in wrong tab)  #13605

Closed

Description

@RRTogunov

System details

RStudio Edition : Desktop
RStudio Version :  2023.06.2 Build 561 "Mountain Hydrangea" (de44a311, 2023-08-23)
OS Version      :   Windows 11 x64 (build 22621)
R Version       :  4.3.1 (2023-06-16 ucrt)
Platform       :  x86_64-w64-mingw32/x64 (64-bit)

Issue also in
RStudio Version : 2023.06.0 Build 421 "Mountain Hydrangea"
R Version : 4.3.0 (2023-04-21 ucrt)

Steps to reproduce the problem

Unable to reliably reproduce, but some source editor tabs become very glitchy. Occurs after several minutes, hours, or days. When one tab stops working, any tabs opened afterward will also stop working (existing files or new files).

Describe the problem in detail

(Note: temporary solution posted here. Right-click anywhere in RStudio and select 'Reload'; reloads Rstudio without losing environment.)
There are 5 main issues that all occur together:

  1. text selection with mouse click-drag stops working
  2. multi-line edit doesn't work or repeats all inputs with each key press since initiating multi-line
  3. multi-cursor edit only types in last location, and cursor stops showing
  4. shortcuts stop showing up, or worse, appear in another tab (can overwrite any selected text)
  5. sections (eg, code chunks, functions) can no longer be minimised

Here are gifs of the first 4:

  1. text select: disfunctional_text_select
  2. multi-line edit: disfunctional_multi-line_edit](https://github.com/rstudio/rstudio/assets/20913113/a2f507f8-d5da-4d67-a733-612fbc6d14e5)
  3. multi-cursor edit: disfunctional_multi_cursor_edit](https://github.com/rstudio/rstudio/assets/20913113/7d18ec24-e3d5-4cf4-aa1a-86d6336c5f02)
  4. input shortcuts (shortcuts typed in Untitled1 appear in Untitled2 and overwrite selection; note, not shown, but regular text input still works in all tabs): disfunctional_shortcuts](https://github.com/rstudio/rstudio/assets/20913113/ce1dafe7-fb46-4e96-819d-c35432ecf0ea)

In all cases, first tab remains fully functional.
The closest other issue I found is here, but they only describe text selection: #13436 (comment)
I don't think it is related to this particular bug, but I do also experience rstudio losing focus to the "File" menu when pressing alt for multi-line edit as noted in the following issues:

The best solution I found is right-click anywhere in RStudio and select 'Reload', as suggested here: #13436 (comment)
Closing & restarting RStudio also worked (other RStudio windows could remain open).

Uninstalling R and RStudio (including deleting all files/folders related to either from computer in C://Program Files, C://ProgramData, /AppData, and system registry) did not work.

Describe the behavior you expected

  • click & drag should select text

  • Multi-line select should be instantly editable

  • only and all text typed should show up

  • Multi-cursor should appear at every click

  • Multi-cursor input should appear at all multi-cursor points (not just last one)

  • input shortcuts (eg for %<% and <-) should only appear in the active tab

  • 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.

Activity

  1. added
    new
    on Sep 7, 2023
  2. ronblum commented on Sep 7, 2023

    @ronblum
    Contributor

    @RRTogunov Thanks for the report! I'm glad that at least the workaround works so that you don't lose date, but you shouldn't have to do this. Can you provide the log files the next time this happens? Thanks!

  3. added
    info needed
    and removed
    new
    on Sep 7, 2023
  4. RRTogunov commented on Sep 8, 2023

    @RRTogunov
    Author

    (Mistakenly closed)
    Yes, I'll do this next time. Just a few questions:

    should I provide files from Help > Diagnostics > Show Log Files, Help > Diagnostics > Write Diagnostics Report, or something else?
    Should I periodically delete log files to reduce non-relevant information and make it easier to pinpoint the problem when it arises?
    Is there any confidential information in log/diagnostics file I should remove before uploading?

  5. ronblum commented on Sep 8, 2023

    @ronblum
    Contributor

    @RRTogunov Correct, that's how you get the diagnostics report. But also, under the same submenu you choose Show log files, you'll be taken to a directory with a bunch of log files. Grab the current ones, rdesktop.log and rsession-USERNAME.log. There shouldn't be any confidential information in there, but I'll double-check.

  6. ronblum commented on Sep 8, 2023

    @ronblum
    Contributor

    @RRTogunov We recommend that you check the diagnostics report for any sensitive information. RStudio scrubs a lot of other information, but there's a chance that there's something that's intended to be confidential that's not recognized.

    Note that username will appear in the files (it's even in the name of one of the log files).

  7. RRTogunov commented on Sep 11, 2023

    @RRTogunov
    Author

    The issue has come up 3 times since last post. The following zip file contains log and diagnostic files from each occurrence (all solved by reloading UI).
    rstudio_consol_bug.zip
    Note, looking at log files, I'm seeing a lot of "WARNING Unable to retrieve user home path"; I had changed the username folder on my account from <C:\Users\firstname lastname/> to <C:\Users\firstnamelastname/> (removed space), which may or may not be related to the issue at hand.

  8. stevepowell99 commented on Jan 9, 2024

    @stevepowell99

    pretty much the same issues here

  9. kevinushey commented on Jan 9, 2024

    @kevinushey
    Collaborator

    One thing you can try: In RStudio, you right click on an editor instance, and click Inspect Element. This will open a developer console; there, you should see a tab for 'Console'. Within that Console, do you see any Javascript errors? If so, can you share a screenshot / text of the errors you're seeing?

  10. RRTogunov commented on Jan 18, 2024

    @RRTogunov
    Author

    The issue is present in one of my open tabs now. here are a few of the unique errors in the Console tab.
    image
    image
    image
    image

    after reloading the UI, I just have one warning in the Console:
    image

  11. 55 remaining items

  12. kevinushey commented on Nov 7, 2024

    @kevinushey
    Collaborator

    Unfortunately, we still haven't been able to reliably reproduce this issue, and so we cannot fix it for this release.

  13. olivroy commented on Jun 6, 2025

    @olivroy
    Contributor

    I am seeing a little resurgence in this., while having many files opened + creating / editing / moving to files via usethis::edit_file(). If I look at the functions called within it, I see that it uses rstudioapi::navigateToFile() function. Maybe it can be the cause?

  14. kevinushey commented on Jun 6, 2025

    @kevinushey
    Collaborator

    Maybe? Can you provide a set of steps that can reliably reproduce the issue (even if it's not 100% of the time)?

  15. jkylearmstrong commented on Aug 1, 2025

    @jkylearmstrong

    I'm not sure if this is related but I am frequently having issues with RStudio unable to save or run .RMD or .qmd chunks. I will be working on a file and go to save but it won't allow me to. I have to reboot RStudio and then I will have another window of opportunity until it happens again. Occurring on 2 Windows PCS

    RStudio 2025.05.1+513 "Mariposa Orchid" Release (ab7c1bc, 2025-06-01) for windows
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2025.05.1+513 Chrome/132.0.6834.210 Electron/34.5.1 Safari/537.36, Quarto 1.7.32 (C:/Program Files/Quarto/bin/quarto.exe)

  16. self-assigned this
    on Jul 31, 2026
  17. added a commit that references this issue on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buginfo neededsource editor

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions