Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh open files after a global replace #6229

Closed
melissa-barca opened this issue Feb 14, 2020 · 3 comments
Closed

Refresh open files after a global replace #6229

melissa-barca opened this issue Feb 14, 2020 · 3 comments
Assignees
Milestone

Comments

@melissa-barca
Copy link
Contributor

@melissa-barca melissa-barca commented Feb 14, 2020

This issue stems from a post on the community forums: https://community.rstudio.com/t/r-studio-version-1-3-820-global-find-replace-does-not-work/52683

System details

RStudio Edition : All
RStudio Version :  v1.3.* 

Steps to reproduce the problem

Open a file in RStudio. Perform a global find and replace for a word in the file. Although the file has changed outside of RStudio, the IDE does not reflect the change or indicate that there are now unsaved changes (reverting the replace) in the file.

Describe the problem in detail

After performing a global replace we are not refreshing the currently open files to display the new results. This could lead to confusion when a user has multiple files open and performs a replace across them. It is currently very easy for changes to be lost.

Describe the behavior you expected

When an open file is modified by a replace operation and doesn't have unsaved changes, refresh the file's buffer so the changes are displayed.

@melissa-barca melissa-barca added this to the v1.3 milestone Feb 14, 2020
@melissa-barca melissa-barca self-assigned this Feb 14, 2020
@armenic

This comment has been minimized.

Copy link

@armenic armenic commented Feb 14, 2020

Dear developers,
Here is the GIF showing the issue and you can see that even close/open of file or R Studio does not help. Thanks for your time and dedication
Video_2020-02-14_020138
.

@melissa-barca

This comment has been minimized.

Copy link
Contributor Author

@melissa-barca melissa-barca commented Feb 14, 2020

Thanks for the gif @armenic, I was able to reproduce the issue in Windows and have opened PR #6235 with a fix. It should be in the daily build soon.

@melissa-barca

This comment has been minimized.

Copy link
Contributor Author

@melissa-barca melissa-barca commented Feb 14, 2020

After further research, the original description in this issue is not accurate. The files will be refreshed, though in windows this is briefly delayed and in the case of macos this won't happen until the user clicks into the file. It would be nice to have this happen automatically after a replace but it no longer needs to be a 1.3 bug. I'm closing this out and will open an enhancement.

@dfalty dfalty added the verified label Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.