pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Folding issues on v1.4

Open sayyid5416 opened this issue 2 years ago • 8 comments

Issue Type: Bug

Foldings were working fine on earlier versions, but from v1.4 of VS Code, since new better foldings were introduced, some foldings are not working correctly.

Look at the screenshot to understand the issue.

Extension version: 2022.0.1786462952 VS Code version: Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9, 2022-02-03T04:22:20.678Z) OS version: Windows_NT x64 10.0.22543 Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Pentium(R) CPU N3710 @ 1.60GHz (4 x 1600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.91GB (2.66GB free)
Process Argv --crash-reporter-id b3d6d8a6-e711-4a16-8e55-6bdc2a1f7eda
Screen Reader no
VM 0%

Reference Link: https://code.visualstudio.com/updates/v1_64#_python

Screenshots

sayyid5416 avatar Feb 04 '22 04:02 sayyid5416

Expanded

expanded

Collapsed

collapsed

sayyid5416 avatar Feb 04 '22 09:02 sayyid5416

Maybe related to #1768? Trailing paren isn't included in parse node text range.

debonte avatar Feb 12 '22 02:02 debonte

We believe it is a parser issue related to parens, but haven't had time to dig into it yet.

debonte avatar Apr 22 '22 18:04 debonte

@debonte, is your theory that the parser is generating a range that includes the opening paren token but not the closed paren token? I could dig into that to confirm. If that's the case, it should be easy to fix.

erictraut avatar Apr 22 '22 18:04 erictraut

@bschnurr knows more about this.

debonte avatar Apr 22 '22 18:04 debonte

I think I need to revert a fix that was excluding the parens from an expression. but then I'll need to fix issues with multiline semantic tokens too a different way.

bschnurr avatar Jun 09 '22 22:06 bschnurr

I believe, It's been fixed in #3085. Confirmed in image

sayyid5416 avatar Aug 27 '22 15:08 sayyid5416

This is still broken. A fix is in progress though.

debonte avatar Aug 27 '22 21:08 debonte

This issue was fixed in prerelease version 2022.9.21 and is now also available in release version 2022.9.30.

debonte avatar Sep 24 '22 01:09 debonte