Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix a few undo-related bugs #4310
This PR attempts to resolve #4280, fix #4302 and close #4303.
I had to modify the
@benfry There are changes in here to a few of the methods, and how they are called, but I have tried to keep things as neat as possible. Could you please let me know if these changes are ok, if any modification to how changes have been incorporated need to be made, or if further changes are required? Thanks!
#4280 is not fixed
Other two are fixed, but I find Undo still terribly broken when more tabs are involved.
When Undo modifies more tabs, the code in Editor is updated, but they are not marked as modified (orange strip), and when I save without visiting the tabs, changes made by undo are not saved (something to do with SketchCode having both
I was also fighting with this with Rename and I temporarily fixed it in some places (JavaBuild, PreprocessingService) by re-reading documents from all tabs instead of using SketchCode's
Also when Undo affects more tabs, you can undo only from one of them, others don't have any Undo available.
I think Undo needs to be fixed before 3.1. The situation with rewriting text from code is already quite convoluted and maybe it would be better to clean it up instead of adding more complexity by merging this. If you want I can look at it tomorrow.