Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Preserve view state when switching tabs on compare view #10663
When you are comparing two tabs, and click on another tab and come back, the scroll position is lost and you end up at the top of the file. In my use case, I'm comparing SQL scripts and have an additional tab for manually creating a merge script. When I come back to the compare, I've lost my position.
While it looks like it's refreshing the comparison when you tab back, it seems like it could be a little more intelligent in either remembering the scroll position, or only refreshing if one of the two compared files has been modified.
Steps to Reproduce:
changed the title
Only update diff editor scroll position when changes have been detected
Mar 25, 2018
Pushed a fix without introducing a new extra setting, lets try it out in insiders and see how it goes. The new behaviour is that the view state is always preserved and restored as long as the diff editor is not closed.