abingham / traad

An JSON+HTTP server for the rope Python refactoring library
MIT License
107 stars 20 forks source link

When undoing a file rename, try to revert to old file. #31

Open abingham opened 11 years ago

abingham commented 11 years ago

Currently, when we undo a file rename we simply leave an open buffer on the file that no longer exists (i.e. the one that was undone.) We do this because it's simple.

A smarter solution might be to see if we can examine the results of the undo and determine which file we should be visiting instead. If the undo results include a description like "undid rename of foo.py to bar.py", then we can try visiting foo.py and removing the bar.py buffer.

I don't know if this information actually comes out of undo. I haven't looked into it yet.