There are relevant issues regarding this, but previous ones have been closed without completely implementing the fix #4795. Tested this issue on the insiders version.
- VSCode Version: Version 1.35.0
- OS Version: Mac OS High Sierra 10.13.6
Steps to Reproduce:
- Successively try expand region for multiline blocks. After the first line, it eagerly expands to the entire file.
- It also does not expand strings to include to include strings with and without quotes.
This is what is happening right now.

This is the same code in JetBrains pycharm.

Specifically, I find the following lacking in VSCode expand region.
- It does not treat anything beyond a line a single region.
- It does not treat contents within a string and the string as separate regions.
- It is too eager to expand the region to the entire line and to the entire file. (notice in the example when the cursor is within "main" string.
Does this issue occur when all extensions are disabled?: Yes
There are relevant issues regarding this, but previous ones have been closed without completely implementing the fix #4795. Tested this issue on the insiders version.
Steps to Reproduce:
This is what is happening right now.

This is the same code in JetBrains pycharm.

Specifically, I find the following lacking in VSCode expand region.
Does this issue occur when all extensions are disabled?: Yes