amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
58 stars 24 forks source link

Make cursor not to jump to the end of file when sorting is done #34

Closed jansav closed 5 years ago

jansav commented 5 years ago

Hi

This fixes #7.

I don't know this extension enough so that I could tell that it doesn't break anything else.

jansav commented 5 years ago

Further testing says that this is not good approach. activeTextEditor cannot be trusted. I'll figure it out.

jansav commented 5 years ago

Latter commit makes sure that activeTextEditor is used only when active document is saved. This is the only case when position of cursor has to preserve.

amatiasq commented 5 years ago

That's great, thanks for your help! I'm releasing this now.