Skip to content

Expand Selection does not work as expected for multiline blocks #74025

@anooprh

Description

@anooprh

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:

  1. Successively try expand region for multiline blocks. After the first line, it eagerly expands to the entire file.
  2. It also does not expand strings to include to include strings with and without quotes.

This is what is happening right now.
code

This is the same code in JetBrains pycharm.
charm

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

Metadata

Metadata

Assignees

Labels

*extension-candidateIssue identified as good extension implementationeditor-foldingEditor code folding issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions