Skip to content

Running examples from the help pane also executes R markdown code chunk #12959

Open

Description

@RoelVerbelen

System details

RStudio Edition : Desktop
RStudio Version : 2023.03.0 (Build 386)
OS Version      : Windows
R Version       : 4.1.3

Steps to reproduce the problem

Have an R markdown document open and run code from the help pane.

Describe the problem in detail

When an R markdown document is open and you highlight code from the examples section in the help pane and use Ctrl + Enter to execute that code in the console, it not only runs the example code but also sends the line of text / code chunk where your cursor is standing in the R markdown document to the console.

See the screen recording for an illustration:

rstudio_help_pane

Describe the behavior you expected

Highlighting and executing code from the help pane should only execute that code and not the code in the R markdown where your cursor is standing.

  • 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 Apr 5, 2023
  2. mine-cetinkaya-rundel commented on Apr 9, 2023

    @mine-cetinkaya-rundel

    I'm seeing the same thing with RStudio 2023.03.0+386 on MacOS as well.

    I've tried it with visual and source editor and with Quarto and R Markdown documents, and they all present the same issue.

  3. ronblum commented on Apr 14, 2023

    @ronblum
    Contributor

    Reproduced in RStudio Desktop 2023.05.0-daily+212 on MacOS 13.2, as well.

  4. added and removed
    new
    on Apr 14, 2023
  5. lgaborini commented on Aug 17, 2023

    @lgaborini

    It also affects R source files (RStudio Desktop 2023.06.1 build 524 on Windows)

  6. github-actions commented on Feb 14, 2024

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

  7. added
    stale
    on Feb 14, 2024
  8. RoelVerbelen commented on Feb 15, 2024

    @RoelVerbelen
    Author

    Just reacting to the bot message: this is still an issue for me.

  9. removed
    stale
    on Feb 16, 2024
  10. github-actions commented on Aug 14, 2024

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

  11. added
    stale
    on Aug 14, 2024
  12. RoelVerbelen commented on Aug 14, 2024

    @RoelVerbelen
    Author

    Tested it and still an issue in latest version 2024.04.2-764.

  13. removed
    stale
    on Aug 15, 2024
  14. added this to the Mariposa Orchid milestone on Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions