jcollard / elm-mode

Elm mode for emacs
GNU General Public License v3.0
376 stars 67 forks source link

Don't modify the kill-ring in elm-sort-imports #96

Closed appleby closed 7 years ago

appleby commented 7 years ago

Use delete-region instead of kill-region in elm-sort-imports.

Consider the following sequence of commands:

  1. kill some text in buffer A
  2. save buffer A
  3. switch to buffer B
  4. yank text from kill-ring

Prior to this change, if a user had enabled elm-sort-imports-on-save, then when yanking text in step 4, they would not get the text killed in step 1, but rather the import list killed by elm-sort-imports.

baransu commented 7 years ago

Found this issue recently. Glad someone fixed it. Waiting for merge :D

jasonm23 commented 7 years ago

:+1: