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

`Code -> Soft Wrap Long Lines` Does Not Affect New Windows, But `Tools -> Global Options -> Code -> Soft-wrap...` Does #14691

Open emstruong opened 2 weeks ago

emstruong commented 2 weeks ago

System details

RStudio Edition : Desktop
RStudio Version : RStudio 2023.12.1+402 "Ocean Storm" Release (4da58325ffcff29d157d9264087d4b1ab27f7204, 2024-01-29) for Ubuntu Jammy

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.12.1+402 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36 OS Version : Ubuntu 22.04 R Version : 4.3.2

Steps to reproduce the problem

Describe the problem in detail

Describe the behavior you expected

ronblum commented 2 weeks ago

@emstruong Thank you for raising this! I can also reproduce this in RStudio Desktop 2023.03.2+454 on Windows 11. But in 2024.04.0+735, I'm seeing the reverse, in which the when popping out the file in a new window results in the code always soft-wrapping, even if soft wrapping was off.

emstruong commented 2 weeks ago

No problem, @ronblum! For what it's worth, in my experience, when there are new windows, whether the option is 'actually' on or off seems to have a loose correspondence with the R Studio toolbar indicator of whether the option is checked-off or not.

This issue goes beyond soft-wrapping and can also happen when one is trying to execute code with "Ctrl + Enter", where it'll execute code from the main window instead of the new window. But I don't have a reprex handy.

ronblum commented 2 weeks ago

@emstruong I think that what you're describing is in #11684? The fix for it is slated in the release that we're currently working on, Cranberry Hibiscus.

emstruong commented 2 weeks ago

@emstruong I think that what you're describing is in #11684? The fix for it is slated in the release that we're currently working on, Cranberry Hibiscus.

Yes, that's it! Without knowing any of the R-Studio source code, I'd imagine that it's some common bug across both issue.

ronblum commented 2 weeks ago

@emstruong It might be caused by the same issue, but even so, I'll keep this open rather than merging issues, since we don't know for certain if a fix for one issue will fix both.