Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code folding doesn't work with blocks with preprocessor macros (C++) #66404

Closed
indigox4 opened this issue Jan 11, 2019 · 3 comments
Closed

Code folding doesn't work with blocks with preprocessor macros (C++) #66404

indigox4 opened this issue Jan 11, 2019 · 3 comments
Assignees
Labels
editor-folding Editor code folding issues

Comments

@indigox4
Copy link

Issue Type: Bug

Repro steps:

cut and paste the following code snippet into a .cpp file:

void blah()
{
    if( 1 ) {
        if( 2 ) {
#ifdef FOO
            int i = 0;
#endif
        }
    }
}

Move the mouse to the gutter of the if(1) statement and click on the [-] icon to fold it.

Actual result:
The code folding stops at the #ifdef FOO line.

Expected result:
The code folding should collapse everything inside the if(1) block.

VS Code version: Code 1.30.2 (61122f8, 2019-01-07T22:54:13.295Z)
OS version: Windows_NT x64 10.0.14393

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz (48 x 2195)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 63.74GB (50.32GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (5)
Extension Author (truncated) Version
python ms- 2018.12.1
cpptools ms- 0.20.1
mel sat 0.1.2
cmake twx 0.0.17
clang-format xav 1.8.0
@vscodebot
Copy link

vscodebot bot commented Jan 11, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@indigox4 indigox4 changed the title Code folding doesn't work with in blocks with preprocessor macros (C++) Code folding doesn't work with blocks with preprocessor macros (C++) Jan 11, 2019
@indigox4
Copy link
Author

#60670 looks like a different issue. Thanks.

@RMacfarlane RMacfarlane added the editor-folding Editor code folding issues label Jan 11, 2019
@vscodebot vscodebot bot removed the new release label Jan 13, 2019
@aeschli
Copy link
Contributor

aeschli commented Jan 14, 2019

You are requesting c++ aware folding which needs to come from a language extensions like Microsoft/vscode-cpptools.
The extension is aware of the request: See microsoft/vscode-cpptools#407

@aeschli aeschli closed this as completed Jan 14, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-folding Editor code folding issues
Projects
None yet
Development

No branches or pull requests

3 participants