aki77 / atom-expand-region

expanding selection
https://atom.io/packages/expand-region
MIT License
89 stars 9 forks source link

Fix 12: Remove sorting of selections from smallest to largest and use… #13

Closed greena13 closed 7 years ago

greena13 commented 8 years ago

This pull request removes the sorting of selection ranges that takes place in the uniqueness check. This is intended to allow users to be able to specify in what order selections are made with each expansion by modifying the order in which they appear in their config.cson.

I couldn't see any obvious disadvantages to removing this sorting, but I am not sure why it was added in the first place.

Let me know what you think.

(Still need to update failing tests to reflect new behaviour)

rahatarmanahmed commented 7 years ago

In my investigation of #15 I found out that the sorting of selection ranges is necessary in some way to order the ranges in expanding size. Removing the sorting skips some ranges in practice so probably need a different solution for this feature.