Galooshi / sublime-import-js

Sublime Text plugin for ImportJS
MIT License
24 stars 2 forks source link

Replace buffer before asking to resolve #6

Closed lencioni closed 8 years ago

lencioni commented 8 years ago

To reproduce:

  1. Run fix imports on a file that has multiple words to import--some which have exact matches and some which need prompts
  2. Select matches from all prompts
  3. Examine buffer

I would expect to see all of the missing imports to be imported. Instead, I only see the ones that were prompted for. Running fix imports a second time seems to get the rest.

I fixed this by running the replace command before asking to resolve. This will make sure that all things get updated properly.

Fixes #5

trotzig commented 8 years ago

Thanks! I'll merge once you reply to the question I added inline.