nboldi / haskell-tools-atom

An Atom editor binding for the Haskell-tools framework
7 stars 2 forks source link

Can't undo after modifying the file #37

Open Anabra opened 6 years ago

Anabra commented 6 years ago

Write some code, refactor, modify the file (without saving it). Now "Undo Refactor" will say "Nothing to undo".

nboldi commented 6 years ago

See https://github.com/nboldi/haskell-tools-atom/commit/ce5ac55687ba9ba1b40fe4283ccee6f387795eda

Anabra commented 6 years ago

Okay, now there is an error message warning the user to save the file before UndoRefactor, but after saving it, the original error message still pops-up. This is a consequence of #36, which is logical from a developer's point of view, but might be confusing for new users.

My recommendation: I would emphasize the fact that UndoRefactor is only usable right after performing a refactoring. This could be in form of an updated error message, or in the user documentation.

nboldi commented 6 years ago

Updated the error message: https://github.com/haskell-tools/haskell-tools/commit/acac780e123c49e2d619efc9d26db18f9a25a81f