billgoo / vscode-tab-group

MIT License
19 stars 4 forks source link

Improve group color usage #27

Closed sonny89 closed 1 year ago

sonny89 commented 1 year ago

This PR improves the group coloring.

The current behaviour of selecting group color when we are creating a group: we are increasing an index and get the item with this index from a color array. If we create a group, then ungroup it and create a group again, the group color will be different because the index was increased in the background.

With this improvement we are checking which colors were used and how many times. The next color will be the first from the color array which was used the fewest times.