rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.58k stars 1.08k forks source link

Unable to type curly bracket inside of R Sweave code chunk #14667

Closed jdblischak closed 2 days ago

jdblischak commented 3 weeks ago

Verify fixed in:


System details

RStudio Edition : Desktop
RStudio Version : 2024.04.0+735
OS Version      : Windows 11 x64 (build 22631)
R Version       : 4.3.3 (2024-02-29 ucrt)

Steps to reproduce the problem

  1. Open a new R Sweave file (File -> New File -> R Sweave)
  2. Add a code chunk (Ctrl-Alt-I or push the button in the editor UI)
  3. Put the cursor inside of the code chunk. Try to type a curly bracket {

Describe the problem in detail

When I follow the steps above, the curly bracket does not appear. Instead I get the following Autosave error:

image

The above is the quickest way to generate the problem. However, attempting to add the curly bracket can cause chaos at any point. For example, if you have code in the code chunk and then add the curly bracket, the code is erased.

Please see this Posit Community post for the description from the original reporter as well as my reproduction of the bug.

Describe the behavior you expected

I expected a curly bracket to appear inside the code chunk.

ronblum commented 3 weeks ago

@jdblischak Thank you for raising this! We're tracking this bug in issue #14646, so I'll close this one as a duplicate.

ronblum commented 3 weeks ago

Actually I'll keep this open because of the order of events and use both issues for verification.

jdblischak commented 3 weeks ago

so I'll close this one as a duplicate.

Wow! This repo gets a lot of Issues per day. I skimmed the first couple open and closed Issues and PRs before opening mine, but clearly that was insufficient for such a popular repository. Thanks for the quick reply!

ronblum commented 3 weeks ago

True! It's especially popular right now, since we just had a new release last week, and we're already working on the next release. I'm glad for it, because it means that all y'all care enough to let us know about bugs that you find and improvements that you like. 🙂 Plus the development team never seems sleep, although this QA engineer is often sleeping on the job.

ronblum commented 2 weeks ago

Verified fixed in RStudio Desktop 2024.07.0-daily+133 on Windows 11. If you'd like to try out the fixed, you can download a daily build at https://dailies.rstudio.com. Please note that these are for testing purposes only, not for production use.

ronblum commented 2 days ago

Update: We have a fix for this in an upcoming patch. You can get a development version of patch 2024.04.2 at https://dailies.rstudio.com/rstudio/chocolate-cosmos/. The usual caveats apply--this is for testing purposes only, not production.

ronblum commented 2 days ago

See automated tests: https://github.com/rstudio/rstudio-ide-automation/pull/1949

Verified in RStudio Desktop 2024.04.2+761 on Windows 11.

ronblum commented 2 days ago

Verified in RStudio Desktop 2024.07.0-daily+174 on Windows 11 using the same tests.