Fix exception on saving many tab groups #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem cause:
The problem arises when user tries to store too many tab groups. Since we store all tab groups (with full paths to all open tabs for each group) in one string and windows registry's max string length is 1MB we pretty quickly reach this limit and registry key storing operation fails.
Solution:
I propose to store each tab group in its own registry key instead of saving all groups in one key.
This way the amount of groups becomes unlimited and length limit for all tabs paths for one group is ~500k (aforementioned 1 MB)
Results:
Here's how the registry storage look like before and after the proposed change:

Important:
This version will save open tabs in different format in registry so previous versions of this extension won't be able to open it (but they could still work with their "old" format).
Additional fixes:
More:
I've also merged this bugfix with MSVC2019 support fix and published it on Open VSIX Gallery.
Feel free to download and test it :)
Resolves #27