Skip to content

selectionRangeProvider on inner array always returns outer array #91852

@fvclaus

Description

@fvclaus

Issue Type: Bug

Steps to Reproduce:

Execute selectionRangeProvider in an JSON array that is enclosed in another array. It will return the outer array. This behavior changed from 1.41.0 to 1.42.0. In 1.41.0 the inner array was returned.

enclosing_array

If the selectionrange provider is executed at the current position, it will return the top array (first and last line). In previous version, it returned the array from line 4-7.

I have created a repository with a single that demonstrates this behavior:

https://github.com/fvclaus/vscode-selectionrangeprovider/blob/master/src/test/suite/searchEnclosingArray.test.ts

npm run test will execute the test. The vscode version can be changed in src/test/runTests.ts

VS Code version: Code 1.42.1 (c47d83b, 2020-02-11T14:50:36.977Z)
OS version: Linux x64 4.15.0-74-generic snap

Does this issue occur when all extensions are disabled?: Yes

System Info
Item Value
CPUs AMD Ryzen 7 2700 Eight-Core Processor (16 x 2282)
GPU Status 2d_canvas: unavailable_software
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: disabled_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: disabled_software
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) 0, 1, 1
Memory (System) 23.55GB (4.92GB free)
Process Argv --force-user-env --no-sandbox --unity-launch --no-sandbox
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
code-runner for 0.9.16
vscode-emacs-improved rkw 1.1.0

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions