mpickering / hlint-refactor-mode

Emacs bindings for hlint's --refactor option
MIT License
27 stars 5 forks source link

Restore line and column instead of point #3

Closed cocreature closed 8 years ago

cocreature commented 8 years ago

The problem is that point basically represents the number of chars. That means that if we apply e.g. the redundant do suggestion three characters are deleted (do) so we move three chars back. This feels very weird. Saving the column and the line allows us to go back to the same place (assuming it still exists).

Eventually it might be nice to get the position of where the semantic position moved from apply-refact but I am not sure if it's worth the trouble to implement that.

mpickering commented 8 years ago

Thanks.. This is how the other modes work but I couldn't work out how to get it to work in emacs.